1

I have just deployed one mvc application, but it seems that it can't establish proper connection to the database. So during development I was connecting to the database with the following connection string(using windows authentication):

<connectionStrings>
<add name="PicknickDBEntities"     
connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;
provider connection string=&quot;
data source=**-**-**\SQLEXPRESS;
initial catalog=PicknickDB;
integrated security=True;
MultipleActiveResultSets=True;
App=EntityFramework&quot;" 
providerName="System.Data.EntityClient" />

Now my app will go on a machine (with installed SQL Server 2008) with the name VB-app which uses SQL authentication with usrnm and passin order to connect to the database. Any ideas what should I change in my connection string to accommodate the new properties?

2 Answers 2

1

Replace

integrated security = true

with

User Id=usrnm;
Password=passin;
Sign up to request clarification or add additional context in comments.

2 Comments

can I have integratedSecurity = false followed by user name and password?
@Andrez If you like, yes.
1

Remove integrated security=True;

and add

User Id=myUsername; Password=myPassword;

where you change myUsername and myPassoword to the right username & password

It will look like this:

<connectionStrings>
<add name="PicknickDBEntities"     
connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;
provider connection string=&quot;
data source=**-**-**\SQLEXPRESS;
initial catalog=PicknickDB;
User Id=myUsername;
Password=myPassword;
MultipleActiveResultSets=True;
App=EntityFramework&quot;" 
providerName="System.Data.EntityClient" />

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.