asp.net Web部署:在.pubxml中添加MSDeployEnableWebConfigEncryptRule来加密appSettings [英] asp.net Web deploy: add MSDeployEnableWebConfigEncryptRule in .pubxml to encrypt appSettings

查看:98
本文介绍了asp.net Web部署:在.pubxml中添加MSDeployEnableWebConfigEncryptRule来加密appSettings的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Web部署发布asp.net Web应用程序,我需要在web.config文件中加密连接字符串和appsettings。因此在.pubxml中添加了

I am publishing asp.net web application using web deploy and I need to encrypt connectionsstrings and appsettings in web.config file. So added

<MSDeployEnableWebConfigEncryptRule>true</MSDeployEnableWebConfigEncryptRule>

,然后连接字符串被加密但不是appsettings。我也需要加密appsettings。我们可以通过在.pubxml中进行一些更改来加密appsettings吗?或者我们需要使用aspnet_regiis.exe手动完成吗?

in the .pubxml, then connectionstrings are encrypted but not appsettings. I need to encrypt appsettings as well. Can we encrypt appsettings by making some changes in .pubxml or Do we need to do it manually using aspnet_regiis.exe?

推荐答案

经过一些研究,我发现



webdeploy只能加密连接字符串。如果你想加密appsetting或其他部分,你可以尝试使用aspnet_regiis命令行。



aspnet_regiis -peElementName-app/ SampleApplication



参考:(http://forums.iis.net/t/1223409.aspx?Encrypting+any+section+of+Web+Config)
After some research, I found that

webdeploy can only encrypt connection string. If you want to encrypt appsetting or other sections, you can try using aspnet_regiis command line.

aspnet_regiis -pe "ElementName" -app "/SampleApplication"

Ref: (http://forums.iis.net/t/1223409.aspx?Encrypting+any+section+of+Web+Config)


这篇关于asp.net Web部署:在.pubxml中添加MSDeployEnableWebConfigEncryptRule来加密appSettings的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆