Server One: OS Windows Server 2008 + MS SharePoint 2010; Server Two: OS Windows Server 2008 + MS SQL Server 2008
I need to encrypt the connection string in
web.config on Server One to connect to Server Two.
here are simple steps to perform for securing and encrypting the connection strings. Remember we should encrypt all connection strings mentioned in connectionstring tag in web.config.
Remember that encryption happens on the basis of RSA provider.
Open the visual studio command prompt. Type in this commend
aspnet_regiis -pe "connectionStrings" -app "/SPKings"
Where SPkings is the web application and here is the result of this encryption. After this encryption, you do not need to perform any decryption in your code. Runtime will automatically decrypt this connectionstring for you. There will be very light performance issue, very light, However this is okay according to me instead of opening the username, password or server name and database name to any other person.