Timeout error

  • Thread starter Thread starter J
  • Start date Start date
J

J

How can I prevent the error of...

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
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.

The program is returning a quite hefty amount of data, which takes about 40
seconds to retrieve. My session timeouts are set to 900 seconds, but I've
been told I can programatically change it via asp.net.

Any ideas?

TIA
 
This is SQL timeout - not an asp.net session timeout. The 2 are not related.

Set the CommandTimeout property on your SqlCommand object.
 
Thank you.


Marina said:
This is SQL timeout - not an asp.net session timeout. The 2 are not related.

Set the CommandTimeout property on your SqlCommand object.

server
 
J said:
How can I prevent the error of...

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
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.

The program is returning a quite hefty amount of data, which takes about 40
seconds to retrieve. My session timeouts are set to 900 seconds, but I've
been told I can programatically change it via asp.net.

Any ideas?

TIA

Set your CommandTimeout to a few hundred seconds. Setting it to 0
should be infinite but there is a bug in .Net and this functionality
doesn't work. Bump your timeout up to say 100 (its in seconds).
Browsers (clients) don't timeout once they have a connection
established, ignore the fools on the rest of this thread.
 
Back
Top