@@ -59,6 +59,8 @@ internal static class DEFAULT
59
59
internal static readonly SqlAuthenticationMethod Authentication = DbConnectionStringDefaults . Authentication ;
60
60
internal static readonly SqlConnectionAttestationProtocol AttestationProtocol = DbConnectionStringDefaults . AttestationProtocol ;
61
61
internal static readonly SqlConnectionIPAddressPreference IpAddressPreference = DbConnectionStringDefaults . IPAddressPreference ;
62
+ internal const string ServerSPN = DbConnectionStringDefaults . ServerSPN ;
63
+ internal const string FailoverPartnerSPN = DbConnectionStringDefaults . FailoverPartnerSPN ;
62
64
#if NETFRAMEWORK
63
65
internal static readonly bool TransparentNetworkIPResolution = DbConnectionStringDefaults . TransparentNetworkIPResolution ;
64
66
internal const bool Connection_Reset = DbConnectionStringDefaults . ConnectionReset ;
@@ -113,6 +115,8 @@ internal static class KEY
113
115
internal const string Connect_Retry_Count = DbConnectionStringKeywords . ConnectRetryCount ;
114
116
internal const string Connect_Retry_Interval = DbConnectionStringKeywords . ConnectRetryInterval ;
115
117
internal const string Authentication = DbConnectionStringKeywords . Authentication ;
118
+ internal const string Server_SPN = DbConnectionStringKeywords . ServerSPN ;
119
+ internal const string Failover_Partner_SPN = DbConnectionStringKeywords . FailoverPartnerSPN ;
116
120
#if NETFRAMEWORK
117
121
internal const string TransparentNetworkIPResolution = DbConnectionStringKeywords . TransparentNetworkIPResolution ;
118
122
#if ADONET_CERT_AUTH
@@ -173,6 +177,9 @@ private static class SYNONYM
173
177
internal const string User = DbConnectionStringSynonyms . User ;
174
178
// workstation id
175
179
internal const string WSID = DbConnectionStringSynonyms . WSID ;
180
+ // server SPNs
181
+ internal const string ServerSPN = DbConnectionStringSynonyms . ServerSPN ;
182
+ internal const string FailoverPartnerSPN = DbConnectionStringSynonyms . FailoverPartnerSPN ;
176
183
177
184
#if NETFRAMEWORK
178
185
internal const string TRANSPARENTNETWORKIPRESOLUTION = DbConnectionStringSynonyms . TRANSPARENTNETWORKIPRESOLUTION ;
@@ -212,9 +219,9 @@ internal static class TRANSACTIONBINDING
212
219
}
213
220
214
221
#if NETFRAMEWORK
215
- internal const int SynonymCount = 29 ;
222
+ internal const int SynonymCount = 31 ;
216
223
#else
217
- internal const int SynonymCount = 26 ;
224
+ internal const int SynonymCount = 28 ;
218
225
internal const int DeprecatedSynonymCount = 2 ;
219
226
#endif // NETFRAMEWORK
220
227
@@ -257,6 +264,8 @@ internal static class TRANSACTIONBINDING
257
264
private readonly string _initialCatalog ;
258
265
private readonly string _password ;
259
266
private readonly string _userID ;
267
+ private readonly string _serverSPN ;
268
+ private readonly string _failoverPartnerSPN ;
260
269
261
270
private readonly string _workstationId ;
262
271
@@ -322,6 +331,8 @@ internal SqlConnectionString(string connectionString) : base(connectionString, G
322
331
_enclaveAttestationUrl = ConvertValueToString ( KEY . EnclaveAttestationUrl , DEFAULT . EnclaveAttestationUrl ) ;
323
332
_attestationProtocol = ConvertValueToAttestationProtocol ( ) ;
324
333
_ipAddressPreference = ConvertValueToIPAddressPreference ( ) ;
334
+ _serverSPN = ConvertValueToString ( KEY . Server_SPN , DEFAULT . ServerSPN ) ;
335
+ _failoverPartnerSPN = ConvertValueToString ( KEY . Failover_Partner_SPN , DEFAULT . FailoverPartnerSPN ) ;
325
336
326
337
// Temporary string - this value is stored internally as an enum.
327
338
string typeSystemVersionString = ConvertValueToString ( KEY . Type_System_Version , null ) ;
@@ -675,6 +686,8 @@ internal SqlConnectionString(SqlConnectionString connectionOptions, string dataS
675
686
_columnEncryptionSetting = connectionOptions . _columnEncryptionSetting ;
676
687
_enclaveAttestationUrl = connectionOptions . _enclaveAttestationUrl ;
677
688
_attestationProtocol = connectionOptions . _attestationProtocol ;
689
+ _serverSPN = connectionOptions . _serverSPN ;
690
+ _failoverPartnerSPN = connectionOptions . _failoverPartnerSPN ;
678
691
#if NETFRAMEWORK
679
692
_connectionReset = connectionOptions . _connectionReset ;
680
693
_contextConnection = connectionOptions . _contextConnection ;
@@ -732,7 +745,8 @@ internal SqlConnectionString(SqlConnectionString connectionOptions, string dataS
732
745
internal string UserID => _userID ;
733
746
internal string WorkstationId => _workstationId ;
734
747
internal PoolBlockingPeriod PoolBlockingPeriod => _poolBlockingPeriod ;
735
-
748
+ internal string ServerSPN => _serverSPN ;
749
+ internal string FailoverPartnerSPN => _failoverPartnerSPN ;
736
750
737
751
internal TypeSystem TypeSystemVersion => _typeSystemVersion ;
738
752
internal Version TypeSystemAssemblyVersion => _typeSystemAssemblyVersion ;
@@ -843,6 +857,8 @@ internal static Dictionary<string, string> GetParseSynonyms()
843
857
{ KEY . Connect_Retry_Interval , KEY . Connect_Retry_Interval } ,
844
858
{ KEY . Authentication , KEY . Authentication } ,
845
859
{ KEY . IPAddressPreference , KEY . IPAddressPreference } ,
860
+ { KEY . Server_SPN , KEY . Server_SPN } ,
861
+ { KEY . Failover_Partner_SPN , KEY . Failover_Partner_SPN } ,
846
862
847
863
{ SYNONYM . APP , KEY . Application_Name } ,
848
864
{ SYNONYM . APPLICATIONINTENT , KEY . ApplicationIntent } ,
@@ -871,6 +887,8 @@ internal static Dictionary<string, string> GetParseSynonyms()
871
887
{ SYNONYM . UID , KEY . User_ID } ,
872
888
{ SYNONYM . User , KEY . User_ID } ,
873
889
{ SYNONYM . WSID , KEY . Workstation_Id } ,
890
+ { SYNONYM . ServerSPN , KEY . Server_SPN } ,
891
+ { SYNONYM . FailoverPartnerSPN , KEY . Failover_Partner_SPN } ,
874
892
#if NETFRAMEWORK
875
893
#if ADONET_CERT_AUTH
876
894
{ KEY . Certificate , KEY . Certificate } ,
0 commit comments