Encrypting SQL Server Connections in web.config
If you wish to encrypt your connection string inside web.config, it is easy provided you are running in Full trust environment + Your AppPool identity is NOT Network Service (Network Service account doesn't have the ability to save config files)
: Most shared hosting environments are in Medium trust mode and therefore the files in this article won't work.
- Download the zip archive below, extract, and upload both files to your forum's root (~/);
- Browse to the page using your browser, and you will see if your connection is protected;
- if you see an error while loading this page, it means you are not running in Full Trust environment
- If not, click the "Toggle Encryption" button to encrypt your connection string;
- You will see whether your connection string is successfully encrypted right after you click the button.
post edited by Samuel - 2013/02/01 17:19:46