SqlClientPermission Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SqlClientPermission() |
Obsolete.
Initializes a new instance of the SqlClientPermission class. |
SqlClientPermission(PermissionState) |
Initializes a new instance of the SqlClientPermission class. |
SqlClientPermission(PermissionState, Boolean) |
Obsolete.
Initializes a new instance of the SqlClientPermission class. |
SqlClientPermission()
Caution
SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202
Initializes a new instance of the SqlClientPermission class.
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 ()
- Attributes
Applies to
SqlClientPermission(PermissionState)
Initializes a new instance of the SqlClientPermission class.
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)
Parameters
- state
- PermissionState
One of the PermissionState values.
Applies to
SqlClientPermission(PermissionState, Boolean)
Caution
SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202
Initializes a new instance of the SqlClientPermission class.
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)
Parameters
- state
- PermissionState
One of the PermissionState values.
- allowBlankPassword
- Boolean
Indicates whether a blank password is allowed.
- Attributes
Remarks
The PermissionState enumeration takes precedence over the AllowBlankPassword property.
Therefore, if you set AllowBlankPassword to false
, you must also set PermissionState to None
to
prevent a user from making a connection using a blank password. For an example demonstrating how to use security demands, see Code Access Security and
ADO.NET.