Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,

I want sample Connection string for SQL Server DB using entity framework with windows authentication.

I've been searching a bit,and i tried a lot for windows authentication.
Nothing works!!! sighs!

So could you please help me with this ASAP.

With regards
R.K.
Posted
Updated 7-Aug-13 18:49pm
v3

You can check this article to know how i added connection string when using entity framework

Silverlight Application with MVVM WCF and EF[^]
 
Share this answer
 
Check This....:)

C#
connectionString="Data Source=PC4-PC;Initial Catalog=DatabaseName;User ID=sa;Password=password_1"
 
Share this answer
 
Connection strings format as below

For Sql authentication
Data Source=MyPc\SQLEXPRESS;Initial Catalog=My_DB;uid=im;pwd=pwd;timeout=100000;


For Windows authentication
Data Source=MyPc\SQLEXPRESS;Initial Catalog=My_DB;Integrated Security=false;

Happy Coding!
:)
 
Share this answer
 
Comments
♥…ЯҠ…♥ 7-Sep-12 2:03am    
Thanks aarti, but I want connection string skeleton for entity framework in sql server.
Brady Kelly 24-Mar-20 15:39pm    
Integrated Security=false;
Really? For Windows Auth we really want: Integrated Security=true;

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900