共用方式為


SqlClientPermission 建構函式

定義

初始化 SqlClientPermission 類別的新執行個體。

多載

SqlClientPermission()
已淘汰.
已淘汰.

初始化 SqlClientPermission 類別的新執行個體。

SqlClientPermission(PermissionState)

初始化 SqlClientPermission 類別的新執行個體。

SqlClientPermission(PermissionState, Boolean)
已淘汰.
已淘汰.

初始化 SqlClientPermission 類別的新執行個體。

SqlClientPermission()

來源:
SqlClientPermission.cs
來源:
SqlClientPermission.cs
來源:
SqlClientPermission.cs
來源:
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)

來源:
SqlClientPermission.cs
來源:
SqlClientPermission.cs
來源:
SqlClientPermission.cs
來源:
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)

來源:
SqlClientPermission.cs
來源:
SqlClientPermission.cs
來源:
SqlClientPermission.cs
來源:
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

另請參閱

適用於