I want to use a shared RSA Key Container for our web farm to encrypt the web.config.
I have followed all the documented steps, including using the -pa switch to authorize the identity of my app pool on the key.
Has anyone still had problems AFTER authorization? Any suggestions are greatly appreciated.
Error Message:
Fail开发者_StackOverflow社区ed to decrypt using provider 'RsaSharedProvider'. Error message from the provider: The RSA key container could not be opened.
Provider:
<providers>
<add name="RsaSharedProvider" keyContainerName="MyKeys" useMachineContainer="false" description="Uses RsaCryptoServiceProvider to encrypt and decrypt" type="System.Configuration.RsaProtectedConfigurationProvider,System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
Steps:
Encrypt the webconfig in an automated build
<Exec Command="$(_aspNetRegIisExe) $(_pefApp) $(_websiteDirectory)" /> <Exec Command="$(_aspNetRegIisExe) $(_pefCon) $(_websiteDirectory)" />
Publish the website to my destination server
Just need to correct one property:
useMachineContainer="true"
精彩评论