?
Solved

Web.Config Connection String

Posted on 2016-09-13
1
Medium Priority
?
71 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 16

Accepted Solution

by:
Megan Brooks earned 2000 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

765 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