This documentation is archived and is not being maintained.

SiteIdentityPermissionAttribute.CreatePermission Method

Creates and returns a new instance of SiteIdentityPermission.

[Visual Basic]
Overrides Public Function CreatePermission() As IPermission
[C#]
public override IPermission CreatePermission();
[C++]
public: IPermission* CreatePermission();
[JScript]
public override function CreatePermission() : IPermission;

Return Value

A SiteIdentityPermission that corresponds to this attribute.

Exceptions

Exception Type Condition
ArgumentException The identity permission attribute specifies that code should be run with Unrestricted access.

Remarks

This method should only be called by the security system, never by application code.

At compile time, attributes convert security declarations to a serialized form in metadata. Declarative security data in metadata is created from the permission that this method returns that corresponds to this attribute.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SiteIdentityPermissionAttribute Class | SiteIdentityPermissionAttribute Members | System.Security.Permissions Namespace

Show: