A
Arsen V.
I am trying to make the page execute timeout after 2 seconds.
I first tried using the Server.ScriptTimeout = 2 in the Page_Load() event.
The next line does System.Threading.Thread.Sleep(10000); // 10 second pause
I was expecting the page to timeout with a Request timeout error. However,
it did not timeout and continue to execute for the full 10 seconds.
Next, I tried to use the <httpRuntime> configuration to set the
executionTimeout attribute to 2 like this:
<httpRuntime executionTimeout="2"/>
In the Web.config file. However this did not help either.
How can I force my ASPX page to timeout after 2 seconds?
Thanks,
Arsen V.
I first tried using the Server.ScriptTimeout = 2 in the Page_Load() event.
The next line does System.Threading.Thread.Sleep(10000); // 10 second pause
I was expecting the page to timeout with a Request timeout error. However,
it did not timeout and continue to execute for the full 10 seconds.
Next, I tried to use the <httpRuntime> configuration to set the
executionTimeout attribute to 2 like this:
<httpRuntime executionTimeout="2"/>
In the Web.config file. However this did not help either.
How can I force my ASPX page to timeout after 2 seconds?
Thanks,
Arsen V.