This is a migrated thread and some comments may be shown as answers.

Script timing out

1 Answer 50 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
harlowhair
Top achievements
Rank 1
harlowhair asked on 13 Mar 2011, 04:19 PM
Hi,

I have a website which contins a form which calls an API.  This API can take 2 - 3 minutes to return a result and I have wrapped the submit button in an ajax panel.  When the form is submitted, a loading panel is displayed until the result is returned and then the user is rediected to a URL (which is returned from the API).  This all works fine in most cases however it seems when the script runs for a long time it is timing out.  The loading panel disappears and nothing then happens in the page.

Is there a timeout setting that can be used to handle this?  Or should long form submits be handled in a differnet way?  I have already added the following line to the web.config after reading other threads on this forum:

<httpRuntime maxRequestLength="51200" executionTimeout="240"/>

This has not helped however as it is definitely timing out in less than 4 minutes.  The website is built in Sitefinity if this makes any difference?

Thanks
Rob

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 17 Mar 2011, 07:56 AM
Hi harlowhair,

The executionTimeout attribute of your web.config's httpRuntime element specifies the maximum number of seconds a server request is allowed to live. This refers to your ASP.NET thread handling the request on the server. It is not related to the XMLHttpRequest object and the javascript request you make through AJAX. The setting that you need is the AsyncPostBackTimeout property of the ScriptManager on your page. This specifies the time an AJAX request will wait for a response from the server before timing out.

Veli
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Ajax
Asked by
harlowhair
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or