Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

SqlConnection instantiation exception on .NET 4.6 and later after August-September 2018 .NET Framework updates


View products that this article applies to.

Symptoms

After you install the August Preview of Quality Rollup or September 11, 2018, .NET Framework update, instantiation of SqlConnection can throw an exception.

Use of a SqlConnection constructor can lead to a stack trace that resembles the following:

↑ Back to the top


Workaround

Workaround 1

Add the following lines in the configSection of the App.Config file of the application:

<section name="SqlColumnEncryptionEnclaveProviders"
type="System.Data.SqlClient.SqlColumnEncryptionEnclaveProviderConfigurationSection,
System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

Note  If your application doesn't include an app.config file, we recommend that you create and deploy an app.config file that contains this information in the configSection.

If Workaround 1 doesn't work, try Workaround 2.

Workaround 2

Identify a place in the app domain that runs before any objects have been added to the logical call context. Add code to force ConfigurationManager to try to load a section that doesn't exist in any configuration files. For example:

System.Configuration.ConfigurationManager.GetSection("SectionNameThatDoesNotExistInAnyConfigurationFile");

For more information about this issue see the GitHub article Mitigation: Deserialization of objects across app domains.

↑ Back to the top


Status

Microsoft is researching this issue and will provide an update in an upcoming release.

↑ Back to the top


Keywords: kbsurveynew, SqlConnection

↑ Back to the top

Article Info
Article ID : 4470809
Revision : 27
Created on : 3/7/2019
Published on : 3/7/2019
Exists online : False
Views : 479