Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.
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.

share|improve this question

1 Answer 1

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. enter image description here 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.

http://sharepointkings.blogspot.com/2010/08/securing-connection-string-in-webconfig.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.