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>
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?
0
votes
Possible duplicate of stackoverflow.com/questions/54200/…
– Daniel James Bryars
@DanielJamesBryars: the link you referred explains about how to encrypt and decrypt using ASP.NET IIS Registration Tool (Aspnet_regiis.exe). But I am talking about encrypting automatically when publishing using web deploy.
– vineel
1 Answers
0
votes
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)