Jay
Jay

Reputation: 41

What could cause ASP.NET's executionTimeout to not be enforced running under IIS?

I'm trying to troubleshoot a problem, but I'm unable to reproduce it locally under IIS because no matter how low I set executionTimeout, the requests never time out.

I've tried setting this via the web.config (, via code (Page.Server.ScriptTimeout = 5;).

I'm running with binaries that were compiled in release mode, and debug=false is set in the compilation element.

FWIW, under Cassini (the standalone development webserver), everything works as expected, running out of the same directory off of the exact same assemblies/config files.

Any ideas on what could be causing this?

EDIT: If it's relevant, the development workstation in question is running Win7/IIS7.

EDIT 2: I'm using reflection to write out HttpContext.Current.Timeout, and in both Cassini and IIS, it's writing out the value I expect, so it seems that it's a matter of the limit being enforced as opposed to being set incorrectly.

Upvotes: 4

Views: 3243

Answers (1)

iain
iain

Reputation: 1935

Your absolutely correct with <compilation debug="false"/> being a requirement here.

<httpRuntime executionTimeout="45" /> to your web.config. This value is in seconds.

Microsoft Docs reference: HttpRuntimeSection.ExecutionTimeout Property

Additionally, it is worth noting that Server.ScriptTimeout has a range limiter on it inherited from the metabase. See Remarks section at http://msdn.microsoft.com/en-us/library/ms524831(v=vs.90).aspx

Upvotes: 1

Related Questions