集成安全性= SSPI在连接字符串中的含义

问题描述:





我是Ado.net的新手。任何人都可以告诉我集成安全性= SSPI在连接字符串中的含义。如何连接是在这里制作?







问候

Chaithanya M

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

查看 http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v = VS.100).aspx [ ^ ]



集成安全性或Trusted_Connection



虚假时,用户在连接中指定了ID和密码。如果为true,则使用当前Windows帐户凭据进行身份验证。



识别值为true,false,yes,no和sspi(强烈推荐),这相当于如果指定了用户ID和密码,并且Integrated Security设置为true,则将忽略用户ID和密码,并使用Integrated Security。


/ i>
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.


Integrated Security = true; 在所有SQL提供程序中都不起作用,它与 OleDb 一起使用时会引发异常>提供商。所以基本上集成安全性= SSPI; 是优选的,因为它适用于 SQLClient & OleDB 提供商。



其他选项包括:



提供商

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

语法

SqlClient

Integrated Security = true;

- 或 -

集成安全性= SSPI;

OleDb

集成安全性= SSPI;

Odbc

Trusted_Connection = yes;

OracleClient

综合安全=是;


SSPI代表安全支持提供程序接口。 SSPI允许应用程序使用系统上的任何可用安全包,而无需更改接口以使用安全服务。 SSPI不会建立登录凭据,因为这通常是操作系统处理的特权操作。





除了SSPI,您还可以使用true。



集成安全性实际上确保您使用Windows身份验证连接SQL Server,而不是SQL身份验证;这需要用连接字符串提供用户名和密码。
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.


查看更多