SqlConnection.ConnectionTimeout
Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
The time (in seconds) to wait for a connection to open. The default value is 15 seconds.
You can set the amount of time a connection waits to time out by using the Connect Timeout
or Connection Timeout
keywords in the connection string. A value of 0 indicates no limit, and should be avoided in a ConnectionString because an attempt to connect waits indefinitely.
SqlCommand.CommandTimeout
The time in seconds to wait for the command to execute. The default is 30 seconds.