Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Encrypt password in connection string in web config file

Posted on 2013-01-25
5
297 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 80

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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