smv
smv

Reputation: 485

Increasing application timeout for asp.net application

In my application, I make A service call which may take upto 2 mins To return value. (process Take Place across multiple databases).

Upon calling this method the application times out.

I have set the following in web config. still i am getting the error when hosted in IIS

<system.web>
    <compilation debug="true" targetFramework="4.0" />
    <sessionState timeout="40"></sessionState>
    <httpRuntime maxRequestLength="2147483647" executionTimeout="3600"/>

</system.web>

I have set the same execution timeout in service web.config as well please help me in increasing the time out for the application.

Upvotes: 5

Views: 19430

Answers (3)

Doug
Doug

Reputation: 117

<asp:ScriptManager ID="Scriptmanager1" runat="server" AsyncPostBackTimeout="1200" />

the callback to update the browser for the client has a default timeout (90 seconds) in the script manager. so if your code behind is running the full page but the browser does not update, then this tag might help.

Upvotes: 0

user797717
user797717

Reputation: 788

Have you tried setting the shutdownTimeout value in the httpRuntime section? The default shutdown time of an idle application is 90 seconds.

<httpRuntime maxRequestLength="2147483647" shutdownTimeout="360" executionTimeout="3600"/>

MSDN Reference: HttpRuntimeSection.ShutdownTimeout Property

Upvotes: 5

Khanh TO
Khanh TO

Reputation: 48972

<compilation debug="false" targetFramework="4.0" />

Set debug="false" should solve the problem.

From MSDN:

Execution Timeout: Optional Int32 attribute. Specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET. This time-out applies only if the debug attribute in the compilation element is False. Therefore, if the debug attribute is True, you do not have to set this attribute to a large value in order to avoid application shutdown while you are debugging. The default is 110 seconds. Note: In the .NET Framework 1.0 and 1.1, the default is 90 seconds.

Upvotes: 1

Related Questions