IPermission Interface

Defines methods implemented by permission types.

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

'Declaration
<ComVisibleAttribute(True)> _
Public Interface IPermission
	Inherits ISecurityEncodable
'Usage
Dim instance As IPermission

/** @attribute ComVisibleAttribute(true) */ 
public interface IPermission extends ISecurityEncodable
ComVisibleAttribute(true) 
public interface IPermission extends ISecurityEncodable

Permissions in the common language runtime are objects that describe sets of operations that can be secured for specified resources. A permission object describes operations or access that is subject to security control; it does not represent access or a right to perform operations. Permissions are used by both application code and the .NET Framework security system in the following ways.

  • Code requests the permissions it needs in order to run.

  • The security system policy grants permissions to code in order for it to run.

  • Code demands that calling code has a permission.

  • Code overrides the security stack using assert/deny/permit-only.

NoteNote

If you write a new permission, you must implement this interface in your class.

NoteImportant:

A permission can be accessed by multiple threads. When implementing this interface, you must guarantee that the IsSubsetOf, Intersect, Union, and Copy method implementations are thread safe.

This example shows how to define a permission class for use with code access security. All of the necessary permission interfaces are implemented.

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

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

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

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: