Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class AccessDeniedException

Exception thrown when access to a EPiServer resource is denied.

Inheritance
System.Object
System.Exception
AccessDeniedException
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Data
System.Exception.InnerException
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Exception.HResult
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public class AccessDeniedException : EPiServerException, ISerializable, _Exception
Remarks

This exception is commonly thrown when you are denied access to perform an action on a specific content using IContentRepository. For debugging scenarios you can use the ContentLink property for the source page of an exception.

Constructors

AccessDeniedException()

Initializes the new instance of AccessDeniedException

Declaration
public AccessDeniedException()

AccessDeniedException(ContentReference)

Initializes the new instance of AccessDeniedException providing the reference to the page on which it is raised

Declaration
public AccessDeniedException(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

AccessDeniedException(ContentReference, String)

Initializes the new instance of AccessDeniedException providing the reference to the page on which it is raised and other details

Declaration
public AccessDeniedException(ContentReference contentLink, string details)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String details

The details.

AccessDeniedException(SerializationInfo, StreamingContext)

Initializes a new instance of the AccessDeniedException class with serialized data.

Declaration
protected AccessDeniedException(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The object that holds the serialized object data.

System.Runtime.Serialization.StreamingContext context

The contextual information about the source or destination.

AccessDeniedException(String)

Initializes the new instance of AccessDeniedException

Declaration
public AccessDeniedException(string message)
Parameters
Type Name Description
System.String message

The error message that explains the reason for the exception.

AccessDeniedException(String, Exception)

Initializes the new instance of AccessDeniedException

Declaration
public AccessDeniedException(string message, Exception innerException)
Parameters
Type Name Description
System.String message

The error message that explains the reason for the exception.

System.Exception innerException

The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

Properties

The content that generated the exception.

Declaration
public ContentReference ContentLink { get; }
Property Value
Type Description
ContentReference

Implements

System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception

Extension Methods