Encrypting connectionstrings.config in IIS 6.0

Simply call these two commands in cmd prompt:

  1. C:\WINDOWS\microsoft.net\Framework64\v2.0.50727\aspnet_regiis.exe -pef "connectionStrings" C:\MyWebsiteFolder
  2. 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

↓ Add Comment

Comments (0)