SqlConnectionStringBuilder.ConnectRetryInterval Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure. This must be an integer between 1 and 60. The default is 10 seconds.
public:
property int ConnectRetryInterval { int get(); void set(int value); };
public int ConnectRetryInterval { get; set; }
member this.ConnectRetryInterval : int with get, set
Public Property ConnectRetryInterval As Integer
Property Value
Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure.
Exceptions
Value is outside of the allowed range.
Remarks
This property corresponds to the "Connect Retry Interval" key within the SqlConnection connection string.
This value is applied after the first reconnection attempt. When a broken connection is detected, the client immediately attempts to reconnect; this is the first reconnection attempt and only occurs if ConnectRetryCount
is greater than 0. If the first reconnection attempt fails and ConnectRetryCount
is greater than 1, the client waits ConnectRetryInterval
to try the second and subsequent reconnection attempts.