Failed to encrypt the section 'connectionStrings' using provider 'RsaProtectedConfigurationProvider

user1663380 picture user1663380 · Mar 12, 2013 · Viewed 27.3k times · Source

Failed to encrypt the section 'connectionStrings' using provider 'RsaProtectedCo nfigurationProvider'. Error message from the provider: Object already exists.

I followed the guide in http://msdn.microsoft.com/en-us/library/2w117ede.aspx but in step 3 in To grant the ASP.NET identity access to the RSA key container, it says that my identity is my workgroup\username, I do not have impersonation in my web.config file though

I am encrypting web.config using my machine using asp_regiis, then using visual studio to debug then it came with this error

Answer

Steven Muhr picture Steven Muhr · May 8, 2014

For using RsaProtectedConfigurationProvider you need to launch your Command prompt or Visual Studio as an Administrator.

For DataProtectionConfigurationProvider it is not required to run under Admin rights.