Solved

Web.Config Connection String

Posted on 2016-09-13
1
59 Views
Last Modified: 2016-09-17
This is a Entity framework connection string in my web.config.  Is there a way to tidy this.
For example could the actual connection string  "provider connection string"  be pointed to a separate connection string.
Its just sooo ugly and hard to read..


  <add name="MyEFConnection"
         connectionString="metadata=res://*/VN.csdl|res://*/VN.ssdl|res://*/VN.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=PC01;initial catalog=MyDatabaseName;user id=joe;password=xxxxxxx;multipleactiveresultsets=True;connect timeout=30;application name=EntityFramework&quot;"
         providerName="System.Data.EntityClient" />
0
Comment
Question by:Kevin Robinson
[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
1 Comment
 
LVL 14

Accepted Solution

by:
Megan Brooks earned 500 total points
ID: 41795982
I guess it depends on your perspective; I think it just takes a little getting used to.

You have SQL Server authentication credentials embedded in your web.config, in clear text? That seems rather too readable. You'll end up with copies of the password in backups and in source control as well. If you can configure Windows authentication then that issue goes away. Otherwise if you encrypt the connection strings, none of the details will be visible and it shouldn't matter if the format of the connection string is a little messy.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

756 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