What is the difference between Integrated Security = True and Integrated Security = SSPI?

后端 未结 9 2234
独厮守ぢ
独厮守ぢ 2020-11-22 10:36

I have two apps that use Integrated Security. One assigns Integrated Security = true in the connection string, and the other sets Integrated Security = S

9条回答
  •  青春惊慌失措
    2020-11-22 11:03

    Using Windows Authentication

    To connect to the database server is recommended to use Windows Authentication, commonly known as integrated security. To specify the Windows authentication, you can use any of the following two key-value pairs with the data provider. NET Framework for SQL Server:

     Integrated Security = true;
     Integrated Security = SSPI;
    

    However, only the second works with the data provider .NET Framework OleDb. If you set Integrated Security = true for ConnectionString an exception is thrown.

    To specify the Windows authentication in the data provider. NET Framework for ODBC, you should use the following key-value pair.

    Trusted_Connection = yes;
    

    Source: MSDN: Working with Connection Strings

提交回复
热议问题