Search code examples
.netvisual-studio-2012encryptionconnection-stringconfigurationmanager

c# .net ConfigurationManager is broken


I broke configurationManager by mistake . I just tried to secure my connectionstring, but now I am not even able to get normal human readable connectionstring from configuration manager, I just tried some commands in vs2012 command prompt like sapnet_regiiis pef ....bla bla bla , and now when I just try toget connectionstring from configurationmanager it throws an exception , Error message from the provider: The RSA key container could not be opened. ....enter image description here


Solution

  • If you allow access to C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys folder then this problem is handled successfully. right click on the MachineKeys folder ->properties then ->sharing then add everyone ,or aspnet user then you solved the problem.