encrypt decrypt connection strings

Decrypt Encrypt Connection Strings Web-config

Here i will show you how to encrypt decrypt connection strings in web config file.Connection strings are mostly used for all application to connect the database like get,retrieve,update the data.Web-config mandatory for all application to connect the data strings.When you have encrypt the data, the entire data is highly sensitive so no one get the data.

encrypt decrypt connection strings

Encrypt Decrypt Connection Strings Web-config

Let’s start to connect the data strings into a web configuration file.First you have to make the new connection strings then encrypt the data as your wish.
Just follow Steps to make the Connection Strings in Web-config file.

1. First open the editor(It’s like visual studio or anything) and select the language(like C# or VB).

2. The connection file will be created, after that add a web.config file in the application.

3. After that add the connection strings in web configuration file.

Need to encrypt the connection strings in the web configuration file.To access the data, formally make new connection strings in the web-config file.

Encrypt the data

Now make the application in encryption mode to protect the entire data of your application.

Access the Encrypted data

When you have run the application its automatically encrypt all of your data and it’s also safe from config file.The general code connection strings like,

Decrypt the Connection String

To decrypt the connection string,we need to use the following code.The code look like,


This is J.Vetrivel pandian completed MCA & lives in Udangudi,India. Blogging is my Passion, I love to write article about Programming. Apart from blogging, I’ll run Grocery Store that’s my Profession.