Site Site Site Site Class

Definition

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
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
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
Inheritance
SiteSiteSiteSite
Attributes
Implements

Remarks

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) Site(String) Site(String) Site(String)

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

Properties

Name Name Name Name

Gets the website from which the code assembly originates.

Methods

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