Script timing out

2 posts, 0 answers
  1. harlowhair
    harlowhair avatar
    14 posts
    Member since:
    Nov 2006

    Posted 13 Mar 2011 Link to this post

    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
  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 17 Mar 2011 Link to this post

    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!
Back to Top