Solved

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

Posted on 2012-04-01
2
1,388 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
2 Comments
 
LVL 74

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 500 total points
ID: 37794751
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

11 Experts available now in Live!

Get 1:1 Help Now