Reputation: 1625
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="
data source=**-**-**\SQLEXPRESS;
initial catalog=PicknickDB;
integrated security=True;
MultipleActiveResultSets=True;
App=EntityFramework""
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?
Upvotes: 1
Views: 645
Reputation: 909
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="
data source=**-**-**\SQLEXPRESS;
initial catalog=PicknickDB;
User Id=myUsername;
Password=myPassword;
MultipleActiveResultSets=True;
App=EntityFramework""
providerName="System.Data.EntityClient" />
Upvotes: 1
Reputation: 51514
Replace
integrated security = true
with
User Id=usrnm;
Password=passin;
Upvotes: 1