Integrated Security = False

后端 未结 4 1919
轻奢々
轻奢々 2021-01-19 16:47

If I use in a connection string:

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

I assume this equates to

相关标签:
4条回答
  • 2021-01-19 16:54

    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).

    0 讨论(0)
  • 2021-01-19 16:59

    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

    0 讨论(0)
  • 2021-01-19 17:04

    If Integrated Security=True then it means the program will be using the current user's login to connect to SQL Server. And If Integrated Security=False then it means the program/ software needs User ID=*****;Password=*****; in order to connect to SQL Server from the application.

    0 讨论(0)
  • 2021-01-19 17:08

    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.

    0 讨论(0)
提交回复
热议问题