diff --git a/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObjectFactory.Windows.cs b/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObjectFactory.Windows.cs index 20c75c8df3f7..96832fb8b46f 100644 --- a/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObjectFactory.Windows.cs +++ b/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObjectFactory.Windows.cs @@ -13,10 +13,13 @@ internal sealed class TdsParserStateObjectFactory public static readonly TdsParserStateObjectFactory Singleton = new TdsParserStateObjectFactory(); - private static bool shouldUseLegacyNetorking; - // If The appcontext switch is set then Use Managed SNI based on the value. Otherwise Managed SNI should always be used. - public static bool UseManagedSNI { get; } = AppContext.TryGetSwitch(UseLegacyNetworkingOnWindows, out shouldUseLegacyNetorking) ? !shouldUseLegacyNetorking : true; + // Temporary disabling App Context switching for managed SNI. + // If the appcontext switch is set then Use Managed SNI based on the value. Otherwise Managed SNI should always be used. + //private static bool shouldUseLegacyNetorking; + //public static bool UseManagedSNI { get; } = AppContext.TryGetSwitch(UseLegacyNetworkingOnWindows, out shouldUseLegacyNetorking) ? !shouldUseLegacyNetorking : true; + + public static bool UseManagedSNI { get; } = false; public EncryptionOptions EncryptionOptions { diff --git a/src/System.Data.SqlClient/tests/FunctionalTests/ExceptionTest.cs b/src/System.Data.SqlClient/tests/FunctionalTests/ExceptionTest.cs index 3972fb847689..aaa9efbea521 100644 --- a/src/System.Data.SqlClient/tests/FunctionalTests/ExceptionTest.cs +++ b/src/System.Data.SqlClient/tests/FunctionalTests/ExceptionTest.cs @@ -76,7 +76,7 @@ public void IndependentConnectionExceptionTestExecuteReader() } } - [ActiveIssue(17373)] + [ActiveIssue(19057)] [Theory] [InlineData(@"np:\\.\pipe\sqlbad\query")] [InlineData(@"np:\\.\pipe\MSSQL$NonExistentInstance\sql\query")]