Permission Requests

An assembly can declaratively specify certain permission requests. For example, it can specify a minimal set of permissions that it absolutely requires. If the CLR determines that the required permissions are not to be granted, then the assembly will not even load. The assembly can also specify a nice-to-have set of permissions that, if not granted, will still allow the assembly to load. Assemblies can also specify permissions that are flat-out refused, avoiding the risk of having any dangerous permissions that are simply not needed by the assembly.

The PermissionRequest Example

The PermissionRequest example shows how to make permission requests within an assembly. Three attributes are established using the UIPermission attribute, ...

Get .NET Security and Cryptography now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.