Reputation: 61
How can we establish a connection string in sqlserver 2008 using windows authentication? I hav used this code:
<add name="EmployeeDatabase" connectionString="Data Source=TVPC0006\SQLEXPRESS;Initial Catalog=EmployeeDatabase;" providerName="System.Data.SqlClient" />
Upvotes: 1
Views: 204
Reputation: 5034
for a trusted connection you need to have:
Data Source =myServerAddress;
Initial Catalog =myDataBase;
Integrated Security =SSPI;
Upvotes: 2
Reputation: 19220
Have a look at connectionstrings.com.
You need Integrated Security=SSPI
or Trusted_Connection = True;
Upvotes: 1