See Also: SecurityException Members
A System.Security.SecurityException exception is thrown when a caller does not have the permissions required to access a resource. The following example instantiates a System.Security.PermissionSet object that includes a System.Security.Permissions.UIPermission object to allow access to UI objects and the Clipboard and a System.Security.Permissions.RegistryPermission object to prevent registry access. The call to the PermissionSet.PermitOnly method means that these permissions will apply regardless of the permissions assigned to the caller. As a result, the attempt to create a registry key throws a System.Security.SecurityException.
code reference: System.SecurityException.Class#1
System.Security.SecurityException uses the HRESULT COR_E_SECURITY, which has the value 0x8013150A.
For a list of the initial property values for an instance of the System.Security.SecurityException class, see a specific erload:System.Security.SecurityException.#ctor constructor.