Site Site Site Site Class


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 sealed class Site : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
type Site = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
Public NotInheritable Class Site
Inherits EvidenceBase
Implements IIdentityPermissionFactory


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, is the site identity in the URL This excludes port numbers. If a given URL is, the site is, not


Site(String) Site(String) Site(String) Site(String)

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


Name Name Name Name

Gets the website from which the code assembly originates.


Clone() Clone() Clone() Clone()

Creates a new object that is a copy of the current instance.

Copy() Copy() Copy() Copy()

Creates an equivalent copy of the Site object.

CreateFromUrl(String) CreateFromUrl(String) CreateFromUrl(String) CreateFromUrl(String)

Creates a new Site object from the specified URL.

CreateIdentityPermission(Evidence) CreateIdentityPermission(Evidence) CreateIdentityPermission(Evidence) CreateIdentityPermission(Evidence)

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

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Compares the current Site to the specified object for equivalence.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns the hash code of the current website name.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string representation of the current Site object.

Applies to