Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrated Security = False

If I use in a connection string:

integrated security=false;username=aduffy;password=blah

I assume this equates to

  1. I'm not using windows authentication
  2. and these are my SQL Server authentication details? (aduffy & blah)

That about right?

like image 632
Andrew Duffy Avatar asked May 01 '14 06:05

Andrew Duffy


3 Answers

from msdn

Integrated Security

Integrated Security 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.

like image 87
Nagaraj S Avatar answered Sep 23 '22 03:09

Nagaraj S


SqlConnection.ConnectionString documents all of the valid SQL Server connection string keywords and their meanings.

Integrated Security:

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. SqlCredential is a more secure way to specify credentials for a connection that uses SQL Server Authentication (Integrated Security=false).

like image 44
Damien_The_Unbeliever Avatar answered Sep 26 '22 03:09

Damien_The_Unbeliever


Yes you are right, to use the windows authentication you need to set Integrated security = true. Microsoft recommends SSPI when using windows authentication.

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. SqlCredential is a more secure way to specify credentials for a connection that uses SQL Server Authentication (Integrated Security=false).

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.110).aspx

like image 29
Anup Agrawal Avatar answered Sep 25 '22 03:09

Anup Agrawal