svidgen
svidgen

Reputation: 14282

Change execution timeout at runtime

In some cases, we build reports in ASP.NET that my require several minutes to build -- longer than the default execution timeout. Is it possible to change the timeout at runtime and/or for a specific page [and/or for a specific webservice method]?

We've experimented with HttpRuntimeSection.ExecutionTimeout to no avail (throws an exception at runtime saying The configuration is read only.).

Upvotes: 0

Views: 1351

Answers (2)

svidgen
svidgen

Reputation: 14282

Server.ScriptTimeout seems to be doing the trick for us:

Server.ScriptTimeout = 600;

Upvotes: 1

IceCode
IceCode

Reputation: 1751

You can adjust your timeouts in the webconfig file for the desired page

<location path="somefile.aspx">
    <system.web>
        <httpRuntime executionTimeout="180"/>
    <system.web/>
<location/>

Upvotes: 1

Related Questions