Last post Jan 18, 2010 06:03 PM by aptomar
Oct 30, 2006 11:25 PM|VijayT|LINK
I am working on an application.
I am collecting the inputs from user i Asp .Net form and then querying the database(on another server).From the output, I create a report and send it back to the user.
The problem is , database query takes a lot of time (approx 2 min).By that time, the request times out.
How to set the time out for the request so that the user can get back the response ?
asp.NET 2.0 C#
Oct 31, 2006 02:57 AM|agolden|LINK
You can set this value in web.config. For example, to change the timeout for one specific page:
See http://msdn2.microsoft.com/en-us/library/e1f13641.aspx for more details.
Hope that helps.
Oct 31, 2006 08:14 AM|Gordon-Freeman|LINK
Oct 31, 2006 06:09 PM|VijayT|LINK
I have set the following entries in my to level web.config -
Additionalyy, I added the timeout for ConnectionString -
Connect Timeout=30000" />
In my code , i have set the timeout for database connection -
connection = new OracleConnection(ConfigurationManager.ConnectionStrings["ReportDb"].ToString());
command = new OracleCommand(QueryString, connection);
command.CommandType = CommandType.Text;
command.CommandTimeout = 30000;
However, i found out that using the debugger, even if I stop the flow of code before making any database operation, it times out exactly in 90 sec.So, I don't think database connection is causing the timeout.
Am I missing something ?
Nov 01, 2006 02:01 AM|agolden|LINK
Nov 01, 2006 06:14 PM|VijayT|LINK
I found out one problem.
Earlier , I was using "UpdatePanel" of Atlas to host the content of the report.There, it was timing out exactly at 90 secs, irrespective of any timeout setting , including executionTimeout in "web.Config".(Well, I tried it with "Machine.config" also , but
Yes, I had the debug option as "true".
Now, after some research and your support, I am no more using "UpdatePanel".Instead, I am using the normal asp .Net Panel.
I set "debug" option as "false".
I set execution Timeout to a high value(90000).
But problem has become worse.It is timing out at 30 sec now.
Again, I set the executionTimepot to low value (5 sec).But still, it times out at 30 sec.
I feel that I am missing something.
Nov 03, 2006 02:26 AM|Gordon-Freeman|LINK
Hi~ For your interest, Atlas has now become Asp.net Ajax and there has been significent change on it, including the timeout settings.
Now you can set time in ScriptManager via its AsyncPostBackTimeout property~
Nov 23, 2006 08:01 PM|nanite|LINK
Jul 20, 2007 01:58 AM|arif_azim|LINK
I stopped at your post on how to increase script timeout in asp.net.Please let me know , if you have come accross anything to resolve this.
In my case when I access ASP.NET app from my local dev box, run smoothly except two interim pages take time to render.But when the same app deployed in other server , particular page returns back to previous page without completing to next page.Please let
me know , how I can resolve this.
Jan 18, 2010 06:03 PM|aptomar|LINK
Try changing AsyncPostBackTimeout to 0. I have tested it and it's working for me.
Please mark this as answer if this solves your problem.
My Blog: http://aspnettutorial.wordpress.com/