SqlClientPermission 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 SqlClientPermission 类的新实例。
重载
SqlClientPermission() |
已过时.
已过时.
初始化 SqlClientPermission 类的新实例。 |
SqlClientPermission(PermissionState) |
初始化 SqlClientPermission 类的新实例。 |
SqlClientPermission(PermissionState, Boolean) |
已过时.
已过时.
初始化 SqlClientPermission 类的新实例。 |
SqlClientPermission()
- Source:
- SqlClientPermission.cs
- Source:
- SqlClientPermission.cs
注意
use SqlClientPermission(PermissionState.None)
注意
SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202
初始化 SqlClientPermission 类的新实例。
public:
SqlClientPermission();
public SqlClientPermission ();
[System.Obsolete("use SqlClientPermission(PermissionState.None)", true)]
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)
- Source:
- SqlClientPermission.cs
- Source:
- SqlClientPermission.cs
初始化 SqlClientPermission 类的新实例。
public:
SqlClientPermission(System::Security::Permissions::PermissionState state);
public SqlClientPermission (System.Security.Permissions.PermissionState state);
new System.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState -> System.Data.SqlClient.SqlClientPermission
Public Sub New (state As PermissionState)
参数
- state
- PermissionState
PermissionState 值之一。
另请参阅
适用于
SqlClientPermission(PermissionState, Boolean)
- Source:
- SqlClientPermission.cs
- Source:
- SqlClientPermission.cs
注意
use SqlClientPermission(PermissionState.None)
注意
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);
public SqlClientPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
[System.Obsolete("use SqlClientPermission(PermissionState.None)", 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)]
public SqlClientPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
new System.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState * bool -> System.Data.SqlClient.SqlClientPermission
[<System.Obsolete("use SqlClientPermission(PermissionState.None)", true)>]
new System.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState * bool -> System.Data.SqlClient.SqlClientPermission
[<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 System.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState * bool -> System.Data.SqlClient.SqlClientPermission
Public Sub New (state As PermissionState, allowBlankPassword As Boolean)
参数
- state
- PermissionState
PermissionState 值之一。
- allowBlankPassword
- Boolean
指示是否允许空白密码。
- 属性
注解
PermissionState枚举优先于 AllowBlankPassword 属性。 因此,如果设置为 AllowBlankPasswordfalse
,还必须将 设置为 PermissionStateNone
,以防止用户使用空白密码进行连接。 有关演示如何使用安全要求的示例,请参阅 代码访问安全性和 ADO.NET。