mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Security.CodeAccessPermission System.Security.Permissions.IBuiltInPermission System.Runtime.InteropServices.ComVisible(true)

Using this class, it is possible to ensure that callers are from a specific Web site. Site identity is only defined for code from URLs with the protocols of HTTP, HTTPS, and FTP. A site is the string between the "//" after the protocol of a URL and the following "/", if present, for example, www.fourthcoffee.com 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.

Sites can be matched exactly, or by a wildcard ("*") prefix at the dot delimiter. For example, the site name string *.fourthcoffee.com matches fourthcoffee.com as well as www.fourthcoffee.com. Without a wildcard, the site name must be a precise match. The site name string * will match any site, but will not match code that has no site evidence.

Starting with the net_v40_long, identity permissions are not used.

In the .NET Framework versions 1.0 and 1.1, demands on the identity permissions are effective, even when the calling assembly is fully trusted. That is, although the calling assembly has full trust, a demand for an identity permission fails if the assembly does not meet the demanded criteria. Starting with the .NET Framework version 2.0, demands for identity permissions are ineffective if the calling assembly has full trust. This assures consistency for all permissions, eliminating the treatment of identity permissions as a special case.

In versions of the .NET Framework before the net_v40_long, you could use the method to prevent inadvertent access to system resources by trusted code. is now obsolete, and access to resources is now determined solely by the granted permission set for an assembly. To limit access to files, you must run partially trusted code in a sandbox and assign it permissions only to resources that the code is allowed to access. For information about running an application in a sandbox, see How To: Run Partially Trusted Code in a Sandbox.

In the .NET Framework versions 1.0 and 1.1, identity permissions cannot have an permission state value. Starting with the .NET Framework version 2.0, identity permissions can have any permission state value. This means that in 2.0 and later versions, identity permissions have the same behavior as permissions that implement the interface.

Defines the identity permission for the Web site from which the code originates. This class cannot be inherited.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The fully restricted state of matches no sites. This constructor is included for consistency with the design of other permissions, but is not useful in practice.

  In the .NET Framework versions 1.0 and 1.1, identity permissions cannot have an permission state value. Starting with the .NET Framework version 2.0, identity permissions can have any permission state value. This means that in 2.0 and later versions, identity permissions have the same behavior as permissions that implement the interface. That is, a demand for an identity always succeeds, regardless of the identity of the assembly, if the assembly has been granted full trust.

  In the .NET Framework versions 1.0 and 1.1, demands on the identity permissions are effective, even when the calling assembly is fully trusted. That is, although the calling assembly has full trust, a demand for an identity permission fails if the assembly does not meet the demanded criteria. Starting with the .NET Framework version 2.0, demands for identity permissions are ineffective if the calling assembly has full trust. This assures consistency for all permissions, eliminating the treatment of identity permissions as a special case.

  Initializes a new instance of the class with the specified .

  One of the values.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  Site identity is only defined for code from URLs with the protocols of HTTP, HTTPS, and FTP. A site is the string between the "//" after the protocol of a URL and the following "/", if present, for example, www.fourthcoffee.com 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.

  Sites can be matched exactly, or by a wildcard ("*") prefix at the dot delimiter. For example, the site name string *.fourthcoffee.com matches fourthcoffee.com as well as www.fourthcoffee.com. Without a wildcard, the site name must be a precise match.

  Initializes a new instance of the class to represent the specified site identity.

  The site name or wildcard expression.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.IPermission

  A copy of the permission represents the same access to resources or the same site identity as the original permission.

  Creates and returns an identical copy of the current permission.

  A copy of the current permission.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added.

  Reconstructs a permission with a specified state from an XML encoding.

  The XML encoding to use to reconstruct the permission.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.IPermission ``

  The intersection of two permissions is a permission that describes the sites they both describe in common. Only a demand that passes both original permissions will pass the intersection. For example, the intersection of a permission that represents access to www.fourthcoffee.com and one that represents access to *.fourthcoffee.com is a permission that represents access to www.fourthcoffee.com.

  The intersection of two identical site identity permissions is the same permission. The intersection of two different (not wildcard) expressions is an empty permission. The intersection of a wildcard expression and a matching site is the site. The intersection of two wildcard expressions that match is the longer, more specific of the two expressions.

  Creates and returns a permission that is the intersection of the current permission and the specified permission.

  A new permission that represents the intersection of the current permission and the specified permission. This new permission is null if the intersection is empty.

  A permission to intersect with the current permission. It must be of the same type as the current permission.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The current permission is a subset of the specified permission if the current permission specifies a site that is wholly contained by the specified permission.

  The following table shows the value of for a range of values of the current permission and the specified permission.

  Current Permission

  Specified Permission

  IsSubsetOf

  www.fourthcoffee.com

  www.fourthcoffee.com

  true

  www.fourthcoffee.com

  www.tailspintoys.com

  false

  www.fourthcoffee.com

  *.fourthcoffee.com

  true

  www.fourthcoffee.com

  *.com

  true

  *.fourthcoffee.com

  www.fourthcoffee.com

  false

  *.fourthcoffee.com

  *.fourthcoffee.com

  true

  *.fourthcoffee.com

  *.com

  true

  Anything except None

  *

  true

  None

  Anything

  true

  Determines whether the current permission is a subset of the specified permission.

  true if the current permission is a subset of the specified permission; otherwise, false.

  A permission that is to be tested for the subset relationship. This permission must be of the same type as the current permission.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String To be added.

  Site identity is only defined for code from URLs with the protocols of HTTP, HTTPS, and FTP. A site is the string between the "//" after the protocol of a URL and the following "/", if present, for example, www.fourthcoffee.com 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.

  Sites can be matched exactly, or by a wildcard ("*") prefix at the dot delimiter. For example, the site name string *.fourthcoffee.com matches fourthcoffee.com as well as www.fourthcoffee.com. Without a wildcard, the site name must be a precise match. The site name string * will match any site, but will not match code that has no site evidence.

  Gets or sets the current site.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.SecurityElement To be added.

  Creates an XML encoding of the permission and its current state.

  An XML encoding of the permission, including any state information.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.IPermission ``

  The result of a call to is a permission that represents all the sites represented by both the current permission and the specified permission. Any demand that passes either permission passes their union. For example, the union of a permission that represents access to www.fourthcoffee.com and one that represents access to *.fourthcoffee.com is a permission that represents access to *.fourthcoffee.com.

  The union of a permission and null is the permission that is not null. The union of a permission and a subset of that permission is the permission that contains the subset. Any other combination results in an being thrown. For example, the union of the site identity www.fourthcoffee.com and the site identity www.tailspintoys.com results in an exception because neither is a subset of the other.

  Creates a permission that is the union of the current permission and the specified permission.

  A new permission that represents the union of the current permission and the specified permission.

  A permission to combine with the current permission. It must be of the same type as the current permission.