System.Net.DnsPermissionAttribute Class

Specifies permission to request information from Domain Name Servers.

See Also: DnsPermissionAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.All, AllowMultiple=true, Inherited=false)]
public sealed class DnsPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute

Remarks

The security information declared by System.Net.DnsPermissionAttribute is stored in the metadata of the attribute target, which is the class to which the System.Net.DnsPermissionAttribute is applied. The system then accesses this information at run time. The System.Security.Permissions.SecurityAction that is passed to the constructor determines the allowable DNS targets.

These security attributes are used only for [<topic://cpcondeclarativesecurity>]. For [<topic://cpconimperativesecurity>], use the corresponding System.Net.DnsPermission class.

Security access is either fully restricted or fully unrestricted. Set the System.Security.Permissions.PermissionState.Unrestricted property to true to grant access, or false for no access. Set this property as a named parameter.

For more information about using attributes, see [<topic://cpconExtendingMetadataUsingAttributes>].

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0, 2.0.0.0, 4.0.0.0