Solved

Encrypt password in connection string in web config file

Posted on 2013-01-25
5
293 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
Comment Utility
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 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to Backup Ubuntu to Amazon S3

CloudBerry Backup offers automatic cloud backup and restoration for Linux. It has both GUI and command line interface (CLI) ensuring its flexibility in use. Find out more

Join & Write a Comment

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now