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

前端 未结 7 1826
执笔经年
执笔经年 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:33

    I followed the approach listed below when I had Bad Data error while manual decryption.

    1. Add Remove and Clear tags in configProtectedData.
    2. Verify –pri was used while exporting key
    3. Also ensure that keyContainerName is same as the one used for regstering

    keyContainerName="MyKeys"

    CONFIG

    
      
    
        
    
    
    
         
    
      
    
    

    REFERENCE

    1. ConnectionString Encryption
    2. Where is RAS Key...

提交回复
热议问题