简体   繁体   中英

System.TypeInitializationException error after encrypting the Connection string in web config

If I dont use encryption then my application works without any error. But I am trying to encrypt Entity framework connectionstring using below given command.

aspnet_regiis -pdf "connectionStrings" "C:\\SecureConStringApp"

But I am getting below error while running the application. Is there any additional steps I have to follow with Database first approach in Entity framework?

An exception of type 'System.TypeInitializationException' occurred in EntityFramework.dll but was not handled in user code

Additional information: The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.

My connection string is given below: 在此处输入图片说明

当我以管理员身份运行Visual Studio时,错误已解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM