The type initializer for ‘System.Data.Entity.Internal.AppConfig’ threw an exception

I got this error after updating my Visual Studio 2015 project with new Nuget Packages. The login with SqlServerMembershipProvider would not work anymore after the update.

I tried to solve the issue by changing the defaultConnectionFactory as advised in https://stackoverflow.com/questions/17585611/the-type-initializer-for-system-data-entity-internal-appconfig-threw-an-except. Unfortunately it did not help.

The error was very simple, self-made. I had searched for the word ‘blob’ but instead of typing it into the search field, I had actually typed it into the web.config file. So if you run into the same problem, you might want to check if the defaultConnectionFactory entry is correct in your web/app.config.

<entityFramework>
<defaultConblobnectionFactory type=”System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework”>
<parameters>
<parameter value=”v11.0″ />
</parameters>
</defaultConblobnectionFactory>

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s