SqlClientPermission 构造函数

定义

重载

SqlClientPermission()
已过时.

初始化 SqlClientPermission 类的新实例。

SqlClientPermission(PermissionState)

初始化 SqlClientPermission 类的新实例。

SqlClientPermission(PermissionState, Boolean)
已过时.

初始化 SqlClientPermission 类的新实例。

SqlClientPermission()

注意

SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202

初始化 SqlClientPermission 类的新实例。

public:
 SqlClientPermission();
[System.Obsolete("SqlClientPermission() has been deprecated.  Use the SqlClientPermission(PermissionState.None) constructor.  http://go.microsoft.com/fwlink/?linkid=14202", true)]
public SqlClientPermission ();
Public Sub New ()
属性

适用于

SqlClientPermission(PermissionState)

初始化 SqlClientPermission 类的新实例。

public:
 SqlClientPermission(System::Security::Permissions::PermissionState state);
public SqlClientPermission (System.Security.Permissions.PermissionState state);
new Microsoft.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState -> Microsoft.Data.SqlClient.SqlClientPermission
Public Sub New (state As PermissionState)

参数

state
PermissionState

PermissionState 值之一。

适用于

SqlClientPermission(PermissionState, Boolean)

注意

SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202

初始化 SqlClientPermission 类的新实例。

public:
 SqlClientPermission(System::Security::Permissions::PermissionState state, bool allowBlankPassword);
[System.Obsolete("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated.  Use the SqlClientPermission(PermissionState.None) constructor.  http://go.microsoft.com/fwlink/?linkid=14202", true)]
public SqlClientPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
[<System.Obsolete("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated.  Use the SqlClientPermission(PermissionState.None) constructor.  http://go.microsoft.com/fwlink/?linkid=14202", true)>]
new Microsoft.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState * bool -> Microsoft.Data.SqlClient.SqlClientPermission
Public Sub New (state As PermissionState, allowBlankPassword As Boolean)

参数

state
PermissionState

PermissionState 值之一。

allowBlankPassword
Boolean

指示是否允许空白密码。

属性

注解

PermissionState枚举优先于 AllowBlankPassword 属性。 因此,如果设置为 AllowBlankPasswordfalse,还必须将 设置为 PermissionStateNone 以防止用户使用空密码建立连接。 有关演示如何使用安全要求的示例,请参阅 代码访问安全性和 ADO.NET

适用于