Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Provides the security zone of a code assembly as evidence for policy evaluation. This class cannot be inherited.
public ref class Zone sealed : System::Security::Policy::EvidenceBase, System::Security::Policy::IIdentityPermissionFactory
public ref class Zone sealed : System::Security::Policy::IIdentityPermissionFactory
[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 Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
public sealed class Zone : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Zone : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
public sealed class Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type Zone = class
inherit EvidenceBase
interface IIdentityPermissionFactory
[<System.Serializable>]
type Zone = class
interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Zone = class
interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Zone = class
inherit EvidenceBase
interface IIdentityPermissionFactory
type Zone = class
inherit EvidenceBase
interface IIdentityPermissionFactory
Public NotInheritable Class Zone
Inherits EvidenceBase
Implements IIdentityPermissionFactory
Public NotInheritable Class Zone
Implements IIdentityPermissionFactory
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.
The presence of Zone evidence produces a ZoneIdentityPermission in the grant set. If there is a Demand for ZoneIdentityPermission, the ZoneIdentityPermission that corresponds to the Zone evidence will be compared with the demanded permission.
Zones are defined by the SecurityZone enumeration.
Zone(Security |
Initializes a new instance of the Zone class with the zone from which a code assembly originates. |
Security |
Gets the zone from which the code assembly originates. |
Clone() |
Creates a new object that is a copy of the current instance. |
Clone() |
Creates a new object that is a complete copy of the current instance. (Inherited from EvidenceBase) |
Copy() |
Creates an equivalent copy of the evidence object. |
Create |
Creates a new zone with the specified URL. |
Create |
Creates an identity permission that corresponds to the current instance of the Zone evidence class. |
Equals(Object) |
Compares the current Zone evidence object to the specified object for equivalence. |
Get |
Gets the hash code of the current zone. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string representation of the current Zone. |
Product | Versions (Obsolete) |
---|---|
.NET | (8 (package-provided), 9 (package-provided), 10 (package-provided)) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1 (5, 6, 7, 8, 9, 10) |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in