How to Decrypt/Encrypt a web.config

Per here:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=185&AspxAutoDetectCookieSupport=1

In the command prompt cd to:
: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
Or the specific path for your version,
Encryption:

aspnet_regiis.exe -pef "connectionStrings" "C:\Inetpub\wwwroot\YourWebSite" –prov "RSAProtectedConfigurationProvider"

Decryption:

aspnet_regiis.exe -pdf "connectionStrings" "C:\Inetpub\wwwroot\YourWebSite"

Notice the change in tag from pef for encryption and pdf for decryption as that messed me up.
In my example I had to run:

aspnet_regiis.exe -pdf "appSettings" "C:\Websites\ajsnto94"

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *