Encrypting connectionstrings.config in IIS 6.0
Posted by Anders Vindberg
in Lunarmedia Blog
on the 09 Feb. 2010 (33,053 views).
Simply call these two commands in cmd prompt:
- C:\WINDOWS\microsoft.net\Framework64\v2.0.50727\aspnet_regiis.exe -pef "connectionStrings" C:\MyWebsiteFolder
- C:\WINDOWS\microsoft.net\Framework64\v2.0.50727\aspnet_regiis -pa "NetFrameworkConfigurationKey" "Network Service"
If you still get a: "Failed
to decrypt using provider 'RsaProtectedConfigurationProvider'. Error
message from the provider: The RSA key container could not be opened." Then call the second command again but replace "Network Service" with "ASPNET".
Source: MS Patterns & Practices: http://msdn.microsoft.com/en-us/library/ms998283.aspx