Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
2.14/5 (4 votes)
See more:
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

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.
 
Share this answer
 
Comments
Sandeep Mewara 11-May-11 6:30am    
My 5!
Kim Togo 11-May-11 6:49am    
Thanks
CodeHawkz 11-May-11 6:45am    
Nice answer :)
Kim Togo 11-May-11 6:49am    
Thanks
M.CHAITHANYA 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
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.
 
Share this answer
 
SSPI stands for Security Support Provider Interface. The SSPI allows an application to use any of the available security packages on a system without changing the interface to use security services. The SSPI does not establish logon credentials because that is generally a privileged operation handled by the operating system.


Other than SSPI you can also use "true".

Integrated Security actually ensures that you are connecting with SQL Server using Windows Authentication, not SQL Authentication; which requires username and password to be provided with the connecting string.
 
Share this answer
 
 
Share this answer
 
Integrated security means that the connection is establish to the database server will be made using the currently logged in thier credentials.
 
Share this answer
 

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