The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Timeout of an ASP.NET page

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Peter van Ooijen

Posts: 284
Nickname: petergekko
Registered: Sep, 2003

Peter van Ooijen is a .NET devloper/architect for Gekko Software
Timeout of an ASP.NET page Posted: Jun 15, 2006 5:42 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Peter van Ooijen.
Original Post: Timeout of an ASP.NET page
Feed Title: Peter's Gekko
Feed URL: /error.htm?aspxerrorpath=/blogs/peter.van.ooijen/rss.aspx
Feed Description: My weblog cotains tips tricks and opinions on ASP.NET, tablet PC's and tech in general.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Peter van Ooijen
Latest Posts From Peter's Gekko

Advertisement

In some cases it can take quite some for the web server to complete your webpage. Setting a time out is not that difficult but Googling around you will either find over complicated scenarios or a very simple and clear story in Dutch. Before recapitulating that one in English I have to credit the author Michiel van Otegem. Besides writing some good content he's done a lot of work for the Dutch user group dotned. See him smiling here, he's the guy on the final picture.

The timeout for a page request depends whether you are running debug or release code. The setting is in the web.config. In debug mode the timeout is 30000000 seconds which is about year. In release mode the timeout is only 90 seconds. In some cases that may not be enough. You cannot set the time out as a property of the page itself; it is a property of the global Server object. Set it in the page init event and reset it in the page unload event.

        private int timeOut;

        private void KopierenJaar_Init(object sender, System.EventArgs e)

        {

            timeOut = Server.ScriptTimeout;

            // Give it 1 hour = 3600 seconds

            Server.ScriptTimeout = 3600;

        }

 

        private void KopierenJaar_Unload(object sender, System.EventArgs e)

        {

            Server.ScriptTimeout = timeOut;

        }

In case your page is doing heavy things in the database you have to set db timeouts as well. See here for a quick look at that.

Read: Timeout of an ASP.NET page

Topic: .NET Framework 3.0 Previous Topic   Next Topic Topic: SharePoint Conference 2006 slidedecks

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use