5

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.

7
  • Do you have an binding section in the web.config for the service? if so, post that. Commented Apr 29, 2013 at 7:56
  • if the return takes 2 minutes then you have bad design. Solve this, make the work on background, keep cache, and other... Commented Apr 29, 2013 at 8:08
  • @Aristos - Without knowing anything about his program or what it's doing how can you possibly make the assumption it's bad design? Some calls will take a long time to complete depending on the actions on the other end of the service. This is the whole point of the time out properties ... Commented Apr 29, 2013 at 8:10
  • @webnoob I am not assump anything, I say that this is bad design. If you do not understand that, then you probably do it also, and for that reason you react, better stay back to your chair and say, "why this is a bad design, what this guy knows that I don't and I must learn" ? Commented Apr 29, 2013 at 8:30
  • @Aristos - If a process on the other end of a service takes 5 minutes to complete (and you have no control over that), what are the options other than to wait for it to complete? Commented Apr 29, 2013 at 8:37

3 Answers 3

5

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

Sign up to request clarification or add additional context in comments.

Comments

1
<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.

2 Comments

Tried to set debug to false .still no use appliaciton Times out in 90 secs
When setting debug=true the executionTimeout is ignored
0
<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.

1 Comment

You should add some text explaining what this answer does and why it provides a solution to the specific problem. Code dumps are rarely ever of use to other people.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.