Last post Nov 30, 2012 09:27 AM by Perkinsville
Nov 26, 2012 12:34 AM|kashifdotnet|LINK
I have a asp.net 2.0 web application. One of the pages is excluded from authentication and is called (Page_Load event) by the WGet utility (through windows scheduler) to perform synchronization. The synchronization process picks up hundreds of records and
updates them one by one on another machine. This process takes around 2 hours to complete. Until now, debug attribute in the web.config file was set to true (debug=true) which I changed to false. But this has broken the synchronization process since it times
out after 2 minutes (default asp.net 2.0 timeout). According to the URL (http://msdn.microsoft.com/en-us/library/e1f13641(vs.90).aspx), the
executionTimeout attribute doesn't work in debug mode set to true. The only solution right now is to set debug=false (so that it will allow the sync process to complete) which obviously is undesirable on a production machine (but atleast it
solves the synchronization problem).
How can I run the lengthy page while keeping debug=false in the web.config file. The sync process is a huge piece of code written by someone else and can't be changed.
Nov 30, 2012 09:27 AM|Perkinsville|LINK
What I understand is that your process runs for 2 hours and only completes if debug=true.
When you set debug=false, then the process timesout after 2 minutes.
If that is correct, then it is just how it should be.
The default value for executionTimeout is 110 seconds and is only utilized when debug=false.
You 2 hour running process works when debug=true because the executionTimeout is ignored. When debug=false the default value is realized.
I would be careful setting the executionTimeout to 2 hours becuase these settings are applied to all ASP.NET application pools using the version of ASP.NET.
But the experience you are having is by design.