Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL-Server
Hi,

I am new to Ado.net.Can anyone please tell me what does Integrated Security=SSPI means in the connection string.How the connection is made here?
 

 
Regards
Chaithanya M
Posted 11-May-11 0:14am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Check out http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=VS.100).aspx[^]
 
"Integrated Security" or "Trusted_Connection"
 
When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication.
 
Recognized values are true, false, yes, no, and sspi (strongly recommended), which is equivalent to true.
 
If User ID and Password are specified and Integrated Security is set to true, the User ID and Password will be ignored and Integrated Security will be used.
  Permalink  
Comments
S Mewara at 11-May-11 6:30am
   
My 5!
Kim Togo at 11-May-11 6:49am
   
Thanks
PasanRatnayake at 11-May-11 6:45am
   
Nice answer :)
Kim Togo at 11-May-11 6:49am
   
Thanks
M.CHAITHANYA at 11-May-11 6:46am
   
Hi Kim Togo,
Thank You very much for replying.But,I am unable to figure out what's teh difference between Integrated Security =true and Integrated security=SSPI.
 
Regards
Chaithu
Kim Togo at 11-May-11 6:48am
   
Hi Chaithu
 
There is no difference. "Recognized values are true, false, yes, no, and sspi (strongly recommended), which is equivalent to true."
 
sspi is equivalent to true.
FRANK FROM SC USA at 2-Apr-12 23:04pm
   
THANK YOU so so very much.
Kim Togo at 10-Apr-12 5:39am
   
You are welcome :-)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Integrated Security=true; doesn't work in all SQL providers, it throws an exception when used with the OleDb provider. So basically Integrated Security=SSPI; is preferred since works with both SQLClient & OleDB provider.
 
Other options are:
 

Provider

Syntax

SqlClient

Integrated Security=true;

-- or --

Integrated Security=SSPI;

OleDb

Integrated Security=SSPI;

Odbc

Trusted_Connection=yes;

OracleClient

Integrated Security=yes;

 
refer:
http://msdn.microsoft.com/en-us/library/vstudio/ms254500%28v=vs.100%29.aspx for more details.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Integrated security means that the connection is establish to the database server will be made using the currently logged in thier credentials.
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 13 May 2014
Copyright © CodeProject, 1999-2014
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