Solved

Web.Config Connection String

Posted on 2016-09-13
1
45 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
1 Comment
 
LVL 13

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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…
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.

708 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

14 Experts available now in Live!

Get 1:1 Help Now