Encrypt Your Web.Config

Friday, 13 June 2008 12:28 by scngan

This topic will show you how can you encrypt your connection string that sit inside your web.config so that others can't see the database login information.
You will need to use aspnet_regiis command tools to help you.

Encrypt:
aspnet_regiis.exe -pef "connectionStrings Name" "C:\Inetpub\wwwroot\MySite" –prov "DataProtectionConfigurationProvider"

Decrypt:
aspnet_regiis.exe -pdf "connectionStrings Name" "C:\Inetpub\wwwroot\MySite"

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   Technical Stuff
Actions:   | E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed
Comments are closed