Try our conversational search powered by Generative AI!

Class PageNotFoundException

Thrown when a page cannot be found

Inheritance
System.Object
System.Exception
PageNotFoundException
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
[Obsolete("Replace usage with ContentNotFoundException")]
public class PageNotFoundException : ContentNotFoundException, ISerializable, _Exception
Remarks

This exception is commonly thrown when you are accessing a page that does not exist using IContentLoader. For debugging scenarios you can use the PageLink property for the source page of an exception.

Constructors

PageNotFoundException()

Initializes a new instance of the PageNotFoundException class for a given page that was not found.

Declaration
public PageNotFoundException()

PageNotFoundException(PageReference)

Initializes a new instance of the PageNotFoundException class for a given page that was not found.

Declaration
public PageNotFoundException(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

PageNotFoundException(Guid)

Initializes a new instance of the PageNotFoundException class for a given page GUID that was not found.

Declaration
public PageNotFoundException(Guid pageGuid)
Parameters
Type Name Description
System.Guid pageGuid

The page GUID.

PageNotFoundException(SerializationInfo, StreamingContext)

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

Declaration
protected PageNotFoundException(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.

PageNotFoundException(String)

Initializes a new instance of the PageNotFoundException class for a given url that was not found.

Declaration
public PageNotFoundException(string pageUrl)
Parameters
Type Name Description
System.String pageUrl

The page URL.

PageNotFoundException(String, Exception)

Initializes the new instance of PageNotFoundException

Declaration
public PageNotFoundException(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

PageGuid

Gets the page GUID.

Declaration
public Guid PageGuid { get; set; }
Property Value
Type Description
System.Guid

The page GUID.

Gets the page link.

Declaration
public PageReference PageLink { get; set; }
Property Value
Type Description
PageReference

The page link.

PageUrl

Gets the page URL.

Declaration
public string PageUrl { get; set; }
Property Value
Type Description
System.String

The page URL.

Implements

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

Extension Methods