An Error Occurred Executing The Configuration Section Handler For Connectionstrings
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more an error occurred executing the configuration section handler for connectionstrings c# about Stack Overflow the company Business Learn more about hiring developers or posting failed to encrypt the section connectionstrings object already exists ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack the rsa key container could not be opened Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Web.config Encryption Error up vote 6 down vote favorite 1 Having
The Rsa Key Container Was Not Found
problem with encryption. I gave full permissions to all users to RSA folders. I did C:\>aspnet_regiis -pe "appSettings" -location "web.config" -prov "RsaProtectedCo nfigurationProvider" Encrypting configuration section... An error occurred executing the configuration section handler for appSettings. Failed to encrypt the section 'appSettings' using provider 'RsaProtectedConfigur ationProvider'. Error message from the provider: Object already exists. Failed! Then I did C:\>aspnet_regiis -pa "NetFrameworkConfigurationKey" "administrator" Adding ACL for access to the RSA dataprotectionconfigurationprovider Key container... The RSA key container was not found. Failed! Followed by C:\>aspnet_regiis -pc "NetFrameworkConfigurationKey" -exp Creating RSA Key container... The RSA key container could not be opened. Failed! Nothing is working for me. Can anyone help? Thanks asp.net encryption rsacryptoserviceprovider aspnet-regiis.exe share|improve this question edited Jan 5 '10 at 17:14 skaffman 276k62614652 asked Jan 5 '10 at 17:13 BKarms 3112 add a comment| 4 Answers 4 active oldest votes up vote 9 down vote I was getting the same issue with this failing: aspnet_regiis -pa "NetFrameworkConfigurationKey" "{Domain}{Username}" The above line was returning "The RSA key container was not found." To fix this issue, I had to run Command Prompt as Administrator (open up Start > Accessories > then right-click Command Prompt and choose Run as administrator...). I had to do this even though my account was an administrator account. share|improve this answer answered Mar 9 '11 at 17:04 chaingarden 14916 1 Running the command prompt as administrator fixed this issue for me. –mkchandler Jun 21 '11 at 14:18 add a comment| up vote 1 down vote C:\>aspnet_regiis -pe "appSettings" -location "web.config" -prov "RsaProtectedConfigurationProvider" In this line your location is incorrect. When you use the -pd switch location is based on IIS's appl
Status : Closed as Not failed to decrypt using provider rsaprotectedconfigurationprovider Reproducible Not Reproducible The product team could
Aspnet_regiis
not reproduce this item with the description and steps provided. A more detailed explanation for the resolution of this particular item may have been provided in the comments section. 1 http://stackoverflow.com/questions/2007746/web-config-encryption-error 0 Sign into vote ID 511835 Comments 4 Status Closed Workarounds 0 Type Bug Repros 0 Opened 11/18/2009 8:25:31 AM Access Restriction Public Description I am using the RsaProtectedConfigurationProvider to encrypt a simple configuration file for C# https://connect.microsoft.com/VisualStudio/feedback/details/511835/the-rsaprotectedconfigurationprovider-sometimes-fails-when-encrypting-an-application-configuration-file console application. The process of encrypting the configuration file sometimes (randomly) fails with the following exception:
System.Configuration.ConfigurationErrorsException: An error occurred executing the configuration section handler for appSettings. ---> System.Configuration.ConfigurationErrorsException: Failed to encrypt the section 'appSettings' using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Object already exists.
I cannot identify a root cause or steps to diagnose this issue further. I have a feeling it has something to do with user profiles, the machine key or security around the key container.
The machine.config configuration file on the machine has not been altered and contains the following: