Last post Apr 23, 2012 06:47 AM by Frank Jiang - MSFT
Apr 18, 2012 10:37 PM|Jackxxx|LINK
I have a webform I'm trying to run. It has 6 grids each with it own sqldatasource control. The sprocs do some calculations to compare two years of purchases. When I open the page using a DB with a large number of transactions for the two years, I get a server
timeout. Is there anyway to change the timeout or could my issue be with the sqldatasource controls?
Here is the error message:
Description: An unhandled exception
occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation
or the server is not responding.
Apr 18, 2012 10:54 PM|Jackxxx|LINK
Is there a way to set the timeout on an sqldatasource control?
My sprocs are taking about 35 to 38 seconds to run, each. There are 6 of them.
Apr 23, 2012 06:47 AM|Frank Jiang - MSFT|LINK
Try to set
SqlCommand.CommandTimeout value to 500. By default,the value is 30 seconds.
or add a Connect Timeout to your connection
<add key="ConnectionName" value="server=LocalHost;uid=sa;pwd=;database=DataBaseName;Connect
Timeout=200; pooling='true'; Max Pool Size=200"/>