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.Object System.Runtime.InteropServices.ComVisible(true)

Security provides methods to access and manipulate the security policy configuration. You cannot create instances of .

Provides the main access point for classes interacting with the security system. This class cannot be inherited.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Boolean To be added.

  If this property is false, even code without can execute. Execution checking is expensive and can eliminate the advantages of lazy policy resolution. This property is provided to disable execution checking when needed.

  A change to this property is not persisted until is called. New processes will not be affected by the change until it is persisted in the registry.

  Gets or sets a value indicating whether code must have in order to execute.

- Method
  4.0.0.0
  System.Boolean

  You can use the method before you cache sensitive data that is obtained after successful security demands.

  If the method has been called higher on the stack, the data should not be cached without capturing the corresponding security context. Otherwise, sensitive data that is obtained under an may become available to code that is no longer be running with that in place.

  The return value is reliable only when it is false, which means that the thread is guaranteed not to require a security context capture. The method may return true when a security context capture is not necessary, to avoid security vulnerabilities.

  is security-critical because its main use is to avoid unnecessary security context captures, which indicates that the code using it is security-sensitive and must be audited.

  Determines whether the current thread requires a security context capture if its security state has to be re-created at a later point in time.

  false if the stack contains no partially trusted application domains, no partially trusted assemblies, and no currently active or modifiers; true if the common language runtime cannot guarantee that the stack contains none of these.

- Method
  4.0.0.0
  System.Security.PermissionSet ``

  In the net_v40_long, the host evidence in must contain evidence.

  The following table shows the permission sets that are returned for each zone.

  Zone

  Permission set

  FullTrust

  LocalIntranet

  Internet

  Internet

  None

  None

  Other evidence, such as or , may be considered.

  The returned permission set can be used by a sandbox to run the application. Note that this method does not specify policy, but helps a host to determine whether the permission set requested by an application is reasonable. This method can be used to map a zone to a sandbox.

  Gets a permission set that is safe to grant to an application that has the provided evidence.

  A permission set that can be used as a grant set for the application that has the provided evidence.

  The host evidence to match to a permission set.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Boolean ``

  Granting of permissions is determined by policy and is different from a demand subject to overrides, such as an assert. Also, only tests the grant of the calling code assembly, independent of other callers on the stack.

  Determines whether a permission is granted to the caller.

  true if the permissions granted to the caller include the permission ; otherwise, false.

  The permission to test against the grant of the caller.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Security.Policy.PolicyLevel `` `` To be added

  Loads a from the specified file.

  The loaded policy level.

  The physical file path to a file containing the security policy information. One of the enumeration values that specifies the type of the policy level to be loaded.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Security.Policy.PolicyLevel `` `` To be added

  Loads a from the specified string.

  The loaded policy level.

  The XML representation of a security policy level in the same form in which it appears in a configuration file. One of the enumeration values that specifies the type of the policy level to be loaded.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Collections.IEnumerator

  The returned enumerator provides successive objects that represent the policy at the respective (machine, user, enterprise, application domain) level of the hierarchy. These objects are the live policy objects; altering these objects can have unpredictable results.

  Minimum policy hierarchy consists of a machine level, an enterprise level, and a user level. However, the hierarchy can include additional levels.

  Provides an enumerator to access the security policy hierarchy by levels, such as computer policy and user policy.

  An enumerator for objects that compose the security policy hierarchy.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Security.PermissionSet ``

  This method invokes the security policy engine, providing it with evidence of the calling code's identity. The result is determined by the security policy.

  Determines what permissions to grant to code based on the specified evidence.

  The set of permissions that can be granted by the security system.

  The evidence set used to evaluate policy.
- Method
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Security.PermissionSet ``

  This method invokes the security policy engine, providing it with an array of objects. The returned permission set represents only those permissions that apply to every evidence in the array. These permissions are either equivalent to, or a subset of the permissions that policy would have granted to each individual evidence. This method behaves as if you were performing an intersection on the results of resolving policy on each of the objects in the array.

  Determines what permissions to grant to code based on the specified evidence.

  The set of permissions that is appropriate for all of the provided evidence.

  An array of evidence objects used to evaluate policy.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Security.PermissionSet `` `` `` `` `` To be added: an object of type 'Policy.Evidence' To be added: an object of type 'PermissionSet' To be added: an object of type 'PermissionSet' To be added: an object of type 'PermissionSet' To be added: an object of type 'PermissionSet&' To be added To be added: an object of type 'PermissionSet' To be added
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Collections.IEnumerator ``

  This method is useful in analyzing how a specified policy configuration works with specific kinds of evidence.

  Code groups will be returned from all applicable levels of the policy hierarchy matching the parameter.

  Gets a collection of code groups matching the specified evidence.

  An enumeration of the set of code groups matching the evidence.

  The evidence set against which the policy is evaluated.
- Method
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Security.PermissionSet ``

  This method invokes the security policy engine and provides it with evidence of the calling code's identity. The result is determined by the system security policy exclusive of any policy.

  Determines which permissions to grant to code based on the specified evidence, excluding the policy for the level.

  The set of permissions that can be granted by the security system.

  The evidence set used to evaluate policy.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Void

  This method saves the policy as exposed by , , and other classes that represent configuration of the security policy. Unless this method is called, changes made to the policy objects will not be saved and will not affect subsequent application runs.

  Saves the modified security policy state.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Void ``

  The will be saved to the same location from which it loaded.

  Saves a modified security policy level loaded with .

  The policy level object to be saved.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("The security manager cannot be turned off on MS runtime")
  System.Boolean True to activate the security manager. False to disable the security manager.

  This property is used by the Caspol.exe (Code Access Security Policy Tool)

  -security (-s) option to turn off code-based security.

  provides a way for administrators to disable code access security. When code access security is disabled, all code access demands succeed. Effectively, this grants all code FullTrust. Disabling code access security bypasses the security system so that code might perform slightly better than the equivalent security policy granting FullTrust to all code. This property does not disable role-based security; therefore, demands are not affected.

  Disabling code access security makes the system vulnerable to attacks by malicious code such as viruses and worms. Disabling code access security does not automatically block managed code from running in any way. It only causes managed code to run without restriction by the code access security system, and should only be done with the most extreme caution. Turning off security to gain extra performance should only be done when other security measures have been taken to help protect system security. Examples of other security precautions include disconnecting from public networks, physically securing computers, and so on.

  A change to this property is not persisted in the registry until is called. New processes will not be affected by the change until it is persisted in the registry. Changing the value of this property in a running process does not necessarily change the state in the expected manner. To ensure changes have taken effect, you must call and start a new process.

  Gets or sets a value indicating whether security is enabled.