C# Class BVNetwork.NotFound.Core.Custom404Handler

Afficher le fichier Open project: BVNetwork/404handler

Méthodes publiques

Méthode Description
FileNotFoundExceptionHandler ( object sender, EventArgs e ) : void
FileNotFoundHandler ( object sender, EventArgs evt ) : void
GetReferer ( Uri referer ) : string
HandleRequest ( string referer, Uri urlNotFound, BVNetwork.NotFound.Core.CustomRedirects.CustomRedirect &foundRedirect ) : bool

Méthodes protégées

Méthode Description
SetStatusCodeAndShow404 ( HttpContext context, int statusCode = 404 ) : void

Private Methods

Méthode Description
CheckForException ( HttpContext context, Uri notFoundUri ) : bool
GetContext ( ) : HttpContext
IsLocalhost ( ) : bool

Determines whether the current request is on localhost.

IsResourceFile ( Uri notFoundUri ) : bool

Determines whether the specified not found URI is a resource file

Method Details

FileNotFoundExceptionHandler() public static méthode

public static FileNotFoundExceptionHandler ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

FileNotFoundHandler() public static méthode

public static FileNotFoundHandler ( object sender, EventArgs evt ) : void
sender object
evt System.EventArgs
Résultat void

GetReferer() public static méthode

public static GetReferer ( Uri referer ) : string
referer System.Uri
Résultat string

HandleRequest() public static méthode

public static HandleRequest ( string referer, Uri urlNotFound, BVNetwork.NotFound.Core.CustomRedirects.CustomRedirect &foundRedirect ) : bool
referer string
urlNotFound System.Uri
foundRedirect BVNetwork.NotFound.Core.CustomRedirects.CustomRedirect
Résultat bool

SetStatusCodeAndShow404() protected static méthode

protected static SetStatusCodeAndShow404 ( HttpContext context, int statusCode = 404 ) : void
context System.Web.HttpContext
statusCode int
Résultat void