Export (0) Print
Expand All
Expand Minimize

SecurityPermissionFlag Enumeration

Specifies access flags for the security permission object.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.Security.Permissions
Assembly:  mscorlib (in mscorlib.dll)

[<SerializableAttribute>]
[<ComVisibleAttribute(true)>]
[<FlagsAttribute>]
type SecurityPermissionFlag

Member nameDescription
AllFlagsThe unrestricted state of the permission.
AssertionAbility to assert that all this code's callers have the requisite permission for the operation.
BindingRedirectsPermission to perform explicit binding redirection in the application configuration file. This includes redirection of .NET Framework assemblies that have been unified as well as other assemblies found outside the .NET Framework.
ControlAppDomainAbility to create and manipulate an AppDomain.
ControlDomainPolicyAbility to specify domain policy.
ControlEvidenceAbility to provide evidence, including the ability to alter the evidence provided by the common language runtime.

This is a powerful permission that should only be granted to highly trusted code.

ControlPolicyAbility to view and modify policy.

This is a powerful permission that should only be granted to highly trusted code.

ControlPrincipalAbility to manipulate the principal object.
ControlThreadAbility to use certain advanced operations on threads.
ExecutionPermission for the code to run. Without this permission, managed code will not be executed.

This flag has no effect when used dynamically with stack modifiers such as Deny, Assert, and PermitOnly.

InfrastructurePermission to plug code into the common language runtime infrastructure, such as adding Remoting Context Sinks, Envoy Sinks and Dynamic Sinks.
NoFlagsNo security access.
RemotingConfigurationPermission to configure Remoting types and channels.
SerializationFormatterAbility to provide serialization services. Used by serialization formatters.
SkipVerificationAbility to skip verification of code in this assembly. Code that is unverifiable can be run if this permission is granted.

This is a powerful permission that should be granted only to highly trusted code.

This flag has no effect when used dynamically with stack modifiers such as Deny, Assert, and PermitOnly.

UnmanagedCodeAbility to call unmanaged code.

Since unmanaged code potentially allows other permissions to be bypassed, this is a dangerous permission that should only be granted to highly trusted code. It is used for such applications as calling native code using PInvoke or using COM interop.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

This enumeration is used by SecurityPermission.

Caution noteCaution

Many of these flags are powerful and should only be granted to highly trusted code.

The following code example shows the use of the SecurityPermissionFlag enumeration to deny and demand security permissions.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Obsolete (compiler warning) in Windows Phone 8.1
Obsolete (compiler warning) in Windows Phone Silverlight 8.1
Obsolete (compiler warning) in Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft