由于Web Deploy 3.5使用标志–EnableRule:EncryptWebConfig
支持连接字符串的自动加密。然而,在与运行它:MSDeploy自动加密连接字符串,在字典中找不到密钥
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='C:\[...]\MyApp.WebDeployPackage.zip' -dest:auto,includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\[...]\MyApp.SetParameters.xml" -EnableRule:EncryptWebConfig -verbose
我得到:
Error Code: ERROR_FAILED_TO_ENCRYPT_WEB_CONFIG
More Information: Failed to encrypt destination web.config: C:\[...]\Web.config.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FAILED_TO_ENCRYPT_WEB_CONFIG.
Error: The given key was not present in the dictionary.
的Learn more-link点过时的文件,我似乎无法在网上找到任何信息。
我怀疑这个工具在幕后使用aspnet_regiis,但我不确定。是的,我使用完全管理权限运行上述操作。
我正在部署到Windows Server 2008,即使使用详细参数,也没有收到任何错误。它只是没有加密连接字符串。部署相同的包到2012年服务器我收到错误。对于部署到2008和IIS 7.5的用户来说,这只是一个参考。 – bkstill