This topic has not yet been rated - Rate this topic

SecurityManager.CheckExecutionRights Property

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

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

Namespace:  System.Security
Assembly:  mscorlib (in mscorlib.dll)
public static bool CheckExecutionRights { get; set; }

Property Value

Type: System.Boolean
true if code must have Execution in order to execute; otherwise, false.
ExceptionCondition
SecurityException

The code that calls this method does not have SecurityPermissionFlag.ControlPolicy.

If this property is false, even code without Execution 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 SavePolicy is called. New processes will not be affected by the change until it is persisted in the registry.

For the complete example, see the SecurityManager class topic.

// Gets a value indicating whether code must have execution rights in order to execute. 
if(!SecurityManager.CheckExecutionRights)
    Console.WriteLine("Execution rights are not required to run the assemblies.");

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.