Timeout error

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
 
M

Marina

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

Set the CommandTimeout property on your SqlCommand object.
 
J

J

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
 
G

Giscard

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top