Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: entity
In local machine i have sqlexpress for entity framework DB and used following connection string.
<add name="PUBSEntities" connectionString="metadata=res://*/Models.Pubs.csdl|res://*/Models.Pubs.ssdl|res://*/Models.Pubs.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PUBS.MDF;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /> 
 
Working fine. But in development server while deploying there is no SQL Express only SQL Server is there. What connection string i can use. I tried but not working. Can you please help me?
Posted 30-May-11 0:09am
Edited 30-May-11 0:10am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Unfortunately, we can't tell what your connection string should be, we don't have the information. You'll need to build it yourself. This is a handy reference: http://www.connectionstrings.com/[^]
 
More than likely the forms you will need are:
 
Data Source=serverNameOrIP;Initial Catalog=databaseName,;User Id=username;Password=password;
 
Which covers SQL authentication, or for windows authentication:
 
Data Source=serverNameOrIP;Initial Catalog=databaseName;Integrated Security=SSPI;
 
If you have a DB admin he/she should be able to give you the values in italics
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 30 May 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100