02 November 2010

The RSA key container could not be opened

Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened.

You hit the error when using encrypted web configuration section such as the connection string.
You can fix this with one of the following method:
1. I'm using Windows Server 2008
2. Open IIS
3. Navigate to the web site that is causing the problem
4. Under Security within the Home section of the web site, click Authentication
6. Disable ASP.NET impersonation

or
aspnet_regiis -pa "NetFrameworkConfigurationKey" "ASPNET"
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NETWORK SERVICE"
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT AUTHORITY\NETWORK SERVICE"
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT AUTHORITY\SYSTEM"

5 comments :

  1. It works! Thanks!

    ReplyDelete
  2. Thanks man, it worked

    ReplyDelete
  3. Thanks a lot....

    ReplyDelete
  4. It worked. Thank You:)

    ReplyDelete
  5. Are there any adverse effects from disabling asp.net impersonation?

    ReplyDelete