Web API stops taking requests after 20-30 minutes

Topics: Web Api
Nov 30, 2011 at 7:07 PM

I have my Web API project (ASP.NET MVC app) hosted in IIS 6 on a Windows Server 2003 box.

It runs fine at first, but then after it has been idle for 20 or 30 minutes, it stops taking ASP.NET requests. It gives the error - the directory contents cannot be listed. If I turn on directory browsing then it shows the contents of the root of the web app. Obviously it should go to my Home/Index view, which leads me to believe that it's not using ASP.NET to pick up the request at this point.

Recycling the app pool, stopping/starting the web site in IIS, and doing an iisreset do not fix the problem. Has anyone else run into this issue and how did you solve it? I've worked with many ASP.NET web apps and WCF services in my day and have never run into this so it leads me to believe it's related to the Web API.

Dec 1, 2011 at 1:13 AM

Do you mind sharing out your repro?