我使用VB 2013创建了一个桌面应用程序,其中一项要求是加密App.config文件-该文件用于保存数据库连接详细信息(用户名,密码)。
在对App.config进行加密之前,我可以在另一台PC上运行.exe文件(实际上是复制粘贴.exe文件),但是在加密后它无法正常工作。我想念什么吗?
这是我的App.config内部的内容:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings configProtectionProvider="DataProtectionconfigurationProvider">
<EncryptedData>
<CipherData>
<CipherValue>encrypted_data_random_characters</CipherValue>
</CipherData>
</EncryptedData>
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<connectionStrings configProtectionProvider="DataProtectionconfigurationProvider">
<EncryptedData>
<CipherData>
<CipherValue>encrypted_data_random_characters</CipherValue>
</CipherData>
</EncryptedData>
</connectionStrings>
</configuration>