Solved

Encrypt password in connection string in web config file

Posted on 2013-01-25
5
296 Views
Last Modified: 2014-11-12
Hi,

Please help... Can someone show me how to encrypt the password in the connection string in a webconfig file.  I am using VS 2010.  I need some specific instructions, since i hardly know C#.  

For you information this is what i am trying to do.. I am developing an application and need to give all my code out to a developer.  I myself write all the sql server code and it is hosted in Azure.  So my thought was that it should not be a problem if i can set the connection string to point to azure... but i need to encrypt it.



Thanks so much in advance,
Joy
0
Comment
Question by:joygomez1964
5 Comments
 

Author Comment

by:joygomez1964
ID: 38820205
BTW this is my connection string.

 <connectionStrings>
    <add name="ForWebAEntities4" connectionString="metadata=res://*/Models.Model1.csdl|res://*/Models.Model1.ssdl|res://*/Models.Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:abc.database.windows.net;initial catalog=ForWebB;integrated security=False;user id=joygomez@l1t8a;password=123456;multipleactiveresultsets=True;encrypt=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
0
 
LVL 79

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 38821715
it is a non-trivial problem.
http://msdn.microsoft.com/en-us/library/yxw286t2%28v=vs.80%29.aspx
you encrypt that part of the web.config, encrypt it then export the RSA key
the developer then must import the RSA key.

if you don't trust the developer then simply let them use sample data and once completed and returned to you as a complete package then you can use your real data.
0
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38821904
Hi,

Consider @ve30fa suggestion!

Added to his info, check this cool article as well  - http://www.codeproject.com/Tips/304638/Encrypt-or-Decrypt-Connection-Strings-in-web-confi

It has explained clearly!

Hope it helps u...
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 39936305
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Companies keep a much closer eye on costs today, so changing to new Technology – Microsoft Office 365 is the smartest move to take.
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question