Site Class
Provides the Web site from which a code assembly originates as evidence for policy evaluation. This class cannot be inherited.
Assembly: mscorlib (in mscorlib.dll)
The Site type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Clone | Creates a new object that is a copy of the current instance. (Overrides EvidenceBase::Clone().) |
![]() | Copy | Creates an equivalent copy of the Site. |
![]() ![]() | CreateFromUrl | Creates a new Site from the specified URL. |
![]() | CreateIdentityPermission | Creates an identity permission that corresponds to the current Site. |
![]() | Equals | Compares the current Site to the specified object for equivalence. (Overrides Object::Equals(Object).) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Returns the hash code of the current Web site name. (Overrides Object::GetHashCode().) |
![]() | 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. (Overrides Object::ToString().) |
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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
