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 ?
Don't forget to click "Mark as Answer" on the post that helped you. This credits that member, earns you a point and marks your thread as Resolved so everyone will know you have been helped.
Marked as answer by Gordon-Freeman on Oct 31, 2006 07:14 AM
Additionally, you will have to set the timeout for your managed data provider (ado.net), add timeout=xx (while xx is seconds) in your connection string, and set every DbCommand.CommandTimeout property~
你好! Just FYI o_O
Marked as answer by Gordon-Freeman on Oct 31, 2006 07:14 AM
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.
Don't forget to click "Mark as Answer" on the post that helped you. This credits that member, earns you a point and marks your thread as Resolved so everyone will know you have been helped.
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
nothing works).
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 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.
VijayT
Member
22 Points
15 Posts
How to increase the time out for request/response ?
Oct 30, 2006 10:25 PM|LINK
Hi,
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 ?
Thanks,
Vijay
ASP.NET 2.0 asp.NET 2.0 C#
agolden
Star
7893 Points
1060 Posts
Re: How to increase the time out for request/response ?
Oct 31, 2006 01:57 AM|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.
Aaron
Gordon-Freem...
Contributor
4655 Points
909 Posts
Re: How to increase the time out for request/response ?
Oct 31, 2006 07:14 AM|LINK
VijayT
Member
22 Points
15 Posts
Re: How to increase the time out for request/response ?
Oct 31, 2006 05:09 PM|LINK
Hi ,
I have set the following entries in my to level web.config -
<system.web>
<customErrors mode="off"/>
<httpRuntime executionTimeout="900000" maxRequestLength="4096" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="true"/>
---
----
</system.web>
Additionalyy, I added the timeout for ConnectionString -
<add name="ReportDb" connectionString="<xxxxxxxxxxxxxx> 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 ?
Thanks,
Vijay
agolden
Star
7893 Points
1060 Posts
Re: How to increase the time out for request/response ?
Nov 01, 2006 01:01 AM|LINK
VijayT
Member
22 Points
15 Posts
Re: How to increase the time out for request/response ?
Nov 01, 2006 05:14 PM|LINK
Hi,
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 nothing works).
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.
Thanks,
Vijay
Gordon-Freem...
Contributor
4655 Points
909 Posts
Re: How to increase the time out for request/response ?
Nov 03, 2006 01:26 AM|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~
nanite
Member
35 Points
10 Posts
Re: How to increase the time out for request/response ?
Nov 23, 2006 07:01 PM|LINK
arif_azim
Member
8 Points
4 Posts
Re: How to increase the time out for request/response ?
Jul 20, 2007 12:58 AM|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.
aptomar
Participant
1227 Points
225 Posts
Re: How to increase the time out for request/response ?
Jan 18, 2010 05:03 PM|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/