Breyta

Deila með


Site Class

Definition

Caution

Code Access Security is not supported or honored by the runtime.

Provides the Web site from which a code assembly originates as evidence for policy evaluation. This class cannot be inherited.

public ref class Site sealed : System::Security::Policy::EvidenceBase, System::Security::Policy::IIdentityPermissionFactory
public ref class Site 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 Site : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
public sealed class Site : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Site : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Site : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
public sealed class Site : 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 Site = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
[<System.Serializable>]
type Site = class
    interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Site = class
    interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Site = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
type Site = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
Public NotInheritable Class Site
Inherits EvidenceBase
Implements IIdentityPermissionFactory
Public NotInheritable Class Site
Implements IIdentityPermissionFactory
Inheritance
Inheritance
Site
Attributes
Implements

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.

The presence of Site evidence produces a SiteIdentityPermission in the grant set. If there is a Demand for SiteIdentityPermission, the SiteIdentityPermission that corresponds to the Site evidence will be compared with the demanded permission.

Site identity is defined for code from URLs with any protocol except FILE. A site is the string between the "//" after the protocol of a URL and the following "/", if present. For example, www.fourthcoffee.com is the site identity in the URL http://www.fourthcoffee.com/process/grind.htm. This excludes port numbers. If a given URL is http://www.fourthcoffee.com:8000/, the site is www.fourthcoffee.com, not www.fourthcoffee.com:8000.

Constructors

Site(String)

Initializes a new instance of the Site class with the website from which a code assembly originates.

Properties

Name

Gets the website from which the code assembly originates.

Methods

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 Site object.

CreateFromUrl(String)

Creates a new Site object from the specified URL.

CreateIdentityPermission(Evidence)

Creates an identity permission that corresponds to the current Site object.

Equals(Object)

Compares the current Site to the specified object for equivalence.

GetHashCode()

Returns the hash code of the current website name.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string representation of the current Site object.

Applies to