Bagikan melalui


SqlClientPermission Konstruktor

Definisi

Overload

SqlClientPermission()
Kedaluwarsa.

Menginisialisasi instans baru kelas SqlClientPermission.

SqlClientPermission(PermissionState)

Menginisialisasi instans baru kelas SqlClientPermission.

SqlClientPermission(PermissionState, Boolean)
Kedaluwarsa.

Menginisialisasi instans baru kelas SqlClientPermission.

SqlClientPermission()

Perhatian

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

Menginisialisasi instans baru kelas 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 ()
Atribut

Berlaku untuk

SqlClientPermission(PermissionState)

Menginisialisasi instans baru kelas 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)

Parameter

state
PermissionState

Salah PermissionState satu nilai.

Berlaku untuk

SqlClientPermission(PermissionState, Boolean)

Perhatian

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

Menginisialisasi instans baru kelas 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)

Parameter

state
PermissionState

Salah PermissionState satu nilai.

allowBlankPassword
Boolean

Menunjukkan apakah kata sandi kosong diizinkan.

Atribut

Keterangan

Enumerasi PermissionState lebih diutamakan daripada AllowBlankPassword properti . Oleh karena itu, jika Anda mengatur AllowBlankPassword ke false, Anda juga harus mengatur PermissionState ke None untuk mencegah pengguna membuat koneksi menggunakan kata sandi kosong. Untuk contoh yang menunjukkan cara menggunakan tuntutan keamanan, lihat Keamanan Akses Kode dan ADO.NET.

Berlaku untuk