This is first time, I try to encrypt the connection string in ASP.Net website. I thought it will be difficult but my surprise, it is very easy to do. Yes of course, if you want to encrypt in one machine and install in server will be different story. You may need to Google more than me. For my case, I have access to server and connection string encryption is just a few minutes task. Here is the step:
- Open the Visual Studio Command Prompt as Administrator.
- Run this command aspnet_regiis -pe "connectionStrings" -site "yoursitename" -app "/"
- After you see the succeeded message in prompt, you open the web.config file you will see the encrypted connection.

There are others options available for this command you can see them as aspnet_regiis /? as usual.
No comments:
Post a Comment