Skip to content

Commit c4ca6bf

Browse files
authored
Merge pull request #35686 from mdaigle/ignore-server-failover
Document AppContext switch for failover partner
2 parents 70ac224 + 5a3ef9a commit c4ca6bf

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/connect/ado-net/appcontext-switches.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,17 @@ When using `Encrypt=false` in the connection string, a security warning is outpu
110110
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.SuppressInsecureTLSWarning", true);
111111
```
112112

113+
## Ignore Server Provided Failover Partner
114+
[!INCLUDE [appliesto-netfx-netcore-netst-md](../../includes/appliesto-netfx-netcore-netst-md.md)]
115+
116+
(Available starting with versions 5.1.8, 6.0.4, and 6.1.3)
117+
118+
Upon failover, failover partner information provided by the server is preferred over failover partner information provided in the connection string. To ignore failover partner information provided by the server and only consider failover partner information provided in the connection string, enable this AppContext switch on application startup:
119+
120+
```csharp
121+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner", true);
122+
```
123+
113124
## See also
114125

115126
[AppContext Class](/dotnet/api/system.appcontext?view=netcore-3.1&preserve-view=true)

0 commit comments

Comments
 (0)