Is it possible to increase the request timeout for just the one particular web page? I am working on ASP.Net 4.0 and I need one particular page to have a longer request timeout, since it is responsible for initiating a long running process. Thanks.
2 Answers
Use Web.config:
<location path="Page.aspx">
<system.web>
<httpRuntime executionTimeout="180"/>
</system.web>
</location>

- 98,240
- 88
- 296
- 433
-
i appreciate your answer but that web.config setting would effect all the pages. I just want to increase the request time out on one or two particular web pages that would do specific long running tasks. – John Hadikusumo Feb 28 '13 at 06:40
-
@JohnHadikusumo: This will affect only Page.aspx given. See [location element](http://msdn.microsoft.com/en-us/library/b6x6shw7%28v=vs.100%29.aspx) – abatishchev Feb 28 '13 at 08:39
-
Oh i didn't notice that path="Page.aspx"...thanks for the answer... i will try it. – John Hadikusumo Feb 28 '13 at 22:13
-
i tried...it works on my computer but when i hosted on amazon it didn't work. i set timeout to 36000 but on Amazon just 2 minutes passed the request already been timed out by the server. – John Hadikusumo Mar 25 '13 at 07:51
This is an old thread, but it should be emphasized that updating the executionTimeout of a page or the entire machine must also be accompanied by the compilation debug flag being set to "false", otherwise the timeout element is ignored.
Also, depending on whether or not you are using AJAX update panels, you may also have to look at the AsycPostBackTimeout flag on the ScriptManager itself - depends on how your timeout is manifesting itself. Ajax post back timeouts will be seen as error messages logged to the Javascript Console and tend to manifest themselves as ajax operations "dying on the vine" depending on how you are handling things.
The debug="false" bit is probably what is afflicting the gentleman above who was having issues on his Amazon Server, but not locally.
Some googling will also reveal that some folks have noticed that localhost handles things differently as well, so you may need to experiment around that.

- 36
- 6