OleDbPermissionAttribute Class
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.
Caution
Code Access Security is not supported or honored by the runtime.
Associates a security action with a custom security attribute.
public ref class OleDbPermissionAttribute sealed : System::Data::Common::DBDataPermissionAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class OleDbPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed class OleDbPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type OleDbPermissionAttribute = class
inherit DBDataPermissionAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type OleDbPermissionAttribute = class
inherit DBDataPermissionAttribute
Public NotInheritable Class OleDbPermissionAttribute
Inherits DBDataPermissionAttribute
- Inheritance
-
OleDbPermissionAttribute
- Attributes
Remarks
Caution
Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.
This class is intended for future use when the .NET Framework Data Provider for OLE DB is enabled for partial trust scenarios. The .NET Framework Data Provider for OLE DB currently requires FullTrust permission. Currently, using the OleDbPermissionAttribute class has no effect. For more information, see Code Access Security and ADO.NET.
Constructors
| Name | Description |
|---|---|
| OleDbPermissionAttribute(SecurityAction) |
Initializes a new instance of the OleDbPermissionAttribute class. |
Properties
| Name | Description |
|---|---|
| AllowBlankPassword |
Gets or sets a value indicating whether a blank password is allowed. (Inherited from DBDataPermissionAttribute) |
| ConnectionString |
Gets or sets a permitted connection string. (Inherited from DBDataPermissionAttribute) |
| KeyRestrictionBehavior |
Identifies whether the list of connection string parameters identified by the KeyRestrictions property are the only connection string parameters allowed. (Inherited from DBDataPermissionAttribute) |
| KeyRestrictions |
Gets or sets connection string parameters that are allowed or disallowed. (Inherited from DBDataPermissionAttribute) |
| Provider |
Gets or sets a comma-delimited string that contains a list of supported providers. |
Methods
| Name | Description |
|---|---|
| CreatePermission() |
Returns an OleDbPermission object that is configured according to the attribute properties. |
| ShouldSerializeConnectionString() |
Identifies whether the attribute should serialize the connection string. (Inherited from DBDataPermissionAttribute) |
| ShouldSerializeKeyRestrictions() |
Identifies whether the attribute should serialize the set of key restrictions. (Inherited from DBDataPermissionAttribute) |