AccessDeniedException Class
The AccessDeniedException class represents the exception thrown when the user does not have sufficient permissions to perform the attempted operation.
System.Object
System.Exception
System.SystemException
System.Security.SecurityException
Microsoft.SharePoint.Portal.Security.AccessDeniedException
Public Constructors
The following table shows the constructors of the AccessDeniedException class and a brief description of each.
| Name | Description |
|---|---|
| AccessDeniedException | Initializes a new instance of the AccessDeniedException class. |
Public Properties
The following table shows the properties of the AccessDeniedException class, the data type of each property, and a brief description of each.
| Name | Data type | Description |
|---|---|---|
| rights | Microsoft.SharePoint.Portal.Security.PortalRight | One or more PortalRight constants that represent the rights that are needed to perform the attempted operation. |
Example
The following example shows how to display a message to the user if AccessDeniedException is thrown.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.
Requirements
Namespace: Microsoft.SharePoint.Portal.Security
Platforms: Microsoft Windows Server 2003
Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)
Security: Code Access Security