Encrypt and Decrypt Connection String Section in Web.Config
Sometime during Development of a Project we may need the help of other Developer to review or Modify our codes. As Such We dont want to give the developer the confidential Specification of the Project.. So The first thing which come to our mind is how to protect the connection string from the other developer..
So Here is a technique to achieve the same:
In the Web.Config file we found <connectionStrings> section that enable us to add ConnectionStrings
Next is the Encryption and Decryption of the above Section..You can Use the following code snippet to get the desired result:
Note: Dont Forget to add System.Web.Configuration Namespace...