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

前端 未结 7 1832
执笔经年
执笔经年 2021-02-13 02:46

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:30

    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

提交回复
热议问题