Solved

Encrypt password in connection string in web config file

Posted on 2013-01-25
5
300 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
[X]
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
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 81

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Optimized for private cloud infrastructures and datacenters, Nano Server is minimalistic, yet super-efficient, OS for services such as Hyper-V and Hyper-V cluster. Learn how you can easily deploy Nano Server and unlock its power!
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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