?
Solved

How to hide the database connection string in the web.config

Posted on 2012-04-01
2
Medium Priority
?
1,533 Views
Last Modified: 2012-04-02
I would like to encrypt the database connection string so our developers do not know what the password is to connect to our production database.
We have 3 environments. Dev, test and Prod.  Dev and Test I have no issues with the Developer seeing the username and passwords unencrypted in the web.config file.  But when moving to the production environment I would like to hide this information from the developer.  Do I do the following?

run
C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -pe "connectionStrings" -prov "DataProtectionConfigurationProvider" -app "/"
Encrypting configuration section...
Succeeded!

and then copy the resulting results to the web.config?  Or is their another solution?
0
Comment
Question by:IandINSW
[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
2 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 37794147
I haven't confirmed the parameters of your command, but yes, you would use aspnet_regiis for this purpose.
0
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 2000 total points
ID: 37794751
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 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