Failed to decrypt using provider 'RsaProtectedConfigurationProvider'?

前端 未结 2 1926
眼角桃花
眼角桃花 2020-12-31 21:19

In my windows application i am trying to encrypt connection string section of app.config file, connection string part of my app.config file is



        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-31 22:00

    The app.config file will have been encrypted using a certificate on your local machine. This certificate will not be present on the other machine. You will therefore not be able to decrypt the app.config file.

    For this to work, you need to export the encryption key on your machine, then import it on the other machine. The following article demonstrates how to do that: Walkthrough: Creating and Exporting an RSA Key Container

提交回复
热议问题