Click here to Skip to main content
12,243,721 members (41,785 online)
Rate this:
Please Sign up or sign in to vote.
See more: entity-framework
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 1:09am
Edited 30-May-11 1:10am

1 solution

Rate this: bad
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:[^]

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 30 May 2011
Copyright © CodeProject, 1999-2016
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