問題
使用 aspnet_regiis 加密 or 解密Config連線字串
解決方法
在SDK的 CMD底下:
aspnet_regiis -pef [要加密區段] 檔案位置 -prov "DataProtectionConfigurationProvider"
ex:
aspnet_regiis -pef connectionStrings C:\UC1044\Practices\CS\Mod01_1\Starter執行後畫面如下:


若在其後方加上-prov "DataProtectionConfigurationProvider"
則為指定在被執行的機器上才能執行,可以用來防止程式被移到別台機器
若要解密:
aspnet_regiis -def [要解密區段] 檔案位置
ex:
aspnet_regiis -def connectionStrings C:\UC1044\Practices\CS\Mod01_1\Starter執行後畫面如下:
cmd:
config:

沒有留言:
張貼留言