Web.Config encryption using RsaProtectedConfigurationProvider - “Bad Data” error

前端 未结 7 1733
悲哀的现实
悲哀的现实 2021-02-13 03:07

I am attempting to encrypt connection string values in the Web.Config file for an ASP.NET 2.0 web application, following the procedure described on MSDN. Using the RsaProtectedC

7条回答
  •  说谎
    说谎 (楼主)
    2021-02-13 03:24

    The RsaProtectedConfigurationProvider uses the machine account or the user account to encrypt the keys and save them in a file which called "key container", which usually saved in C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA. And the ASP.NET worker process identity (ASPNET user in XP/2000 or Network Service in case of 2003) should have access to these files to be able to decrypt it or you would get this error message.

    Please check this link for more information

    http://msdn.microsoft.com/en-us/library/dtkwfdky.aspx

提交回复
热议问题