Monday, November 15, 2010

ASP.NET httpRuntime element executionTimeout attribute appears to not work on IIS 7 and Windows 2008 R2.

This was driving me nuts. I was getting 'System.Web.HttpException: Request timed out.' from a long running ASP.NET web request.

I tried setting the executionTimeout in the web.config file, but to no success. It just didn't appear to honor it.

After a lot of digging, I found a post mentioning something new in the IIS 7 infrastructure. It appears there is a new Ping function of IIS to determine if the work process is still active. You have to either disable the Ping by setting the Ping Enabled to false in the Advanced Settings of the Application Pool. Or, you have to increase the Ping Maximum Response Time (seconds) to a higher value than 90 seconds (it's default.)

I went with increasing the Ping Maximum Response Time (seconds) to a much higher value and presto, success.

No comments: