Search code examples
asp.nettimeout

Increase ASP.Net timeout on a per page level


Is it possible to increase the timeout for a single ASP.net page. I know it is possible at the server level, but is it possible at thepage level?

I need this for a single report page that takes 2-3 minutes to load

any ideas?


Solution

  • I think what you're looking for is ScriptTimeout. You can set this in-page like this:

    Page.Server.ScriptTimeout = 60;
    

    The timeout value is in seconds.

    Also, be aware of the fact that if you are running in debug mode, this gets ignored and the timeout is set to the maximum; I don't think that's an issue for you anyway though, as you're increasing the timeout, not decreasing it.