Solved

Web.Config Connection String

Posted on 2016-09-13
1
64 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 15

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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

739 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