1

I have a page containing a FileUpload that I need to timeout after 30 seconds (instead of the default 90). There are plenty of tutorials on how to increase this timeout to allow for larger file uploads, so I used the same technique to decrease the timeout. Namely, setting executionTimeout to 30.

<system.web>
    <httpRuntime executionTimeout="30" maxRequestLength="4096"/>
    <compilation debug="false" targetFramework="4.0" />
</system.web>

When I run this, however, it still does not time out after 30 seconds. I have even tried reading the timeout and outputting to the page.

HttpContext.Current.Server.ScriptTimeout

This confirmed that the executionTimeout was in fact being set to 30. Finally, I have confirmed that debug is off, so the 30 second timeout should be heeded.

Is there anywhere that this setting could be overridden? This file upload needs to timeout at 30 seconds, or bad things happen.

uberchris
  • 108
  • 5
  • What version of IIS (or Windows Server) are you running? – Ruslan Feb 13 '14 at 19:24
  • And have you confirmed that HttpContext.Current.Server.ScriptTimeout is set to 30 in the context of the same exact page where the upload happens? – Ruslan Feb 13 '14 at 19:36
  • Oh, check this out... I think this might be your answer: http://stackoverflow.com/a/13860840/643951 – Ruslan Feb 13 '14 at 19:40
  • When I confirmed the scripttimeout was set to 30, it was on the exact page. I am having trouble setting the system.applicationHost. When I add this to my web.config, the server gives me an error stating "Unrecognized configuration section system.applicationHost". I need an application-level way to set this. – uberchris Feb 13 '14 at 21:32

0 Answers0