Encrypt-Decrypt ASP.NET Web.Config file

Though its not critical, its better to encrypt the passwords and connection strings.

Encrypt :

Path.to.net.framework.directory\aspnet_regiis.exe -pdf  “appSettings”   “path.to.web.config.directory”

Path.to.net.framework.directory\aspnet_regiis.exe -pdf  “aconnectionStrings”   “path.to.web.config.directory”

Replace “pdf” with “pef” for encryption.

I had an AD connection credentials inside <system.web>. The way to encrypt a section inside such tag is, ( example membership section )

aspnet_regiis.exe -pef  “system.web/membership” “path.to.web.config”.








About buminda

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s