Share via


SqlConnectionStringBuilder.MultiSubnetFailover Property

Definition

If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true provides faster detection of and connection to the (currently) active server. For more information about SqlClient support for Always On Availability Groups, see SqlClient Support for High Availability, Disaster Recovery.

public:
 property bool MultiSubnetFailover { bool get(); void set(bool value); };
public bool MultiSubnetFailover { get; set; }
member this.MultiSubnetFailover : bool with get, set
Public Property MultiSubnetFailover As Boolean

Property Value

Returns Boolean indicating the current value of the property.

Remarks

Always specify multiSubnetFailover=True when connecting to the availability group listener of a SQL Server 2012 (or later) availability group or a SQL Server 2012 (or later) Failover Cluster Instance.

Applies to