Mar 19 2006

Protect Configuration Sections in Web.Config

Category: ASP.NET 2.0 - GeneralBil@l @ 19:36

As you know, mostly developersdo place the connection string inside the web.config file. Sometimes, we need to use a username/pwd in the connection string and not only use Trusted Connection. It is always recommended to protected those areas inside your Web.Config especially when they include sensitive data.
In ASP.NET 2.0, it is so easy to accomplish this. I am going to show you a method that will allow you to encrypt/decrypt any section inside your Web.Config file. This method is the result of my complete research on this topic, by reading several articles online, whose links are shown below: