My web.comfig file in the webserver is encrypted . I want to do a change to the config file. While I'm trying to decrypt from the command prompt on the server using following command.
"aspnet_regiis -pd "appSettings" -app "/AppName" I endup with the following error message.
Failed to decrypt using provider 'CustomProvider'. Error message from the provider: The RSA key container could not be opened.
The RSA key container could not be opened. Failed!
The same command has been working in other environments except in my servers. Also I'm using web forms and I tried the same in both the servers. I have gone through all websites but no use.
Thanks in advance for your help.
web.configFailed to decrypt using providerRSA key container could not be opened
Thanks for Replying. THe problem is not with my website. It's working fine. So it means that ASPNET user have access to the key container. I got the error when am trying to decrypt manually from the command prompt. As far as the applications is concerned,
it's working fine.
Finally I got a work around. It seems the person who encrypted the web.config logged in to the server using his own user account. So it's not allowing me to de-crypt the file. So I have created new encryption key and attached the same to Unencrypted web.config
file (backup copy) and I tried it now, it's working fine.
pream
Member
2 Points
7 Posts
The RSA key container could not be opened.
Apr 19, 2010 03:13 PM|LINK
Hi all,
Here is my problem.
My web.comfig file in the webserver is encrypted . I want to do a change to the config file. While I'm trying to decrypt from the command prompt on the server using following command.
"aspnet_regiis -pd "appSettings" -app "/AppName" I endup with the following error message.
Failed to decrypt using provider 'CustomProvider'. Error message from the provider: The RSA key container could not be opened.
The RSA key container could not be opened. Failed!
The same command has been working in other environments except in my servers. Also I'm using web forms and I tried the same in both the servers. I have gone through all websites but no use.
Thanks in advance for your help.
web.config Failed to decrypt using provider RSA key container could not be opened
karthic_85
Contributor
2598 Points
587 Posts
Re: The RSA key container could not be opened.
Apr 19, 2010 05:20 PM|LINK
If user does not have the right to key container. following command will give permission to the account ASPNET
aspnet_regiis -pa "Key Container Name" "ASPNET"
pream
Member
2 Points
7 Posts
Re: The RSA key container could not be opened.
Apr 20, 2010 06:44 PM|LINK
Thanks for Replying. THe problem is not with my website. It's working fine. So it means that ASPNET user have access to the key container. I got the error when am trying to decrypt manually from the command prompt. As far as the applications is concerned, it's working fine.
pream
Member
2 Points
7 Posts
Re: The RSA key container could not be opened.
Apr 22, 2010 01:49 PM|LINK
Just for additional information. I tried to export the key using "Aspnet_regiis -px" command, and got the following error while exporting
"Could not access the RSA key container. Make sure that the ACLs on the container allow you to access it."
I verified that I'm having Admin access to the servers. Is it something to do with the key generated?
Jerry Weng -...
All-Star
29527 Points
3488 Posts
Re: The RSA key container could not be opened.
Apr 23, 2010 05:04 AM|LINK
Hi,
Try these links and tell me the result:
http://forums.asp.net/t/1518116.aspx
http://blogs.msdn.com/mosharaf/archive/2005/11/17/protectedConfiguration.aspx
http://dotnet.itags.org/dotnet-security/43292/
pream
Member
2 Points
7 Posts
Re: The RSA key container could not be opened.
Apr 29, 2010 03:09 PM|LINK
Thanks.
I tried all options but nothing seems working. I couldnot do anything with the key.
pream
Member
2 Points
7 Posts
Re: The RSA key container could not be opened.
Sep 10, 2010 01:30 PM|LINK
Finally I got a work around. It seems the person who encrypted the web.config logged in to the server using his own user account. So it's not allowing me to de-crypt the file. So I have created new encryption key and attached the same to Unencrypted web.config file (backup copy) and I tried it now, it's working fine.
thanks