Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted

1 solution

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)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900