C# Class WhoCanHelpMe.Web.Code.HttpRequestExtensions

Contains extension methods for the HttpRequest object.
Mostra file Open project: jongeorge1/Who-Can-Help-Me

Public Methods

Method Description
IsStaticFile ( this request ) : bool

Examines the request to see if the current file is a static file (i.e. .htm, .css, .js)

RequiresAuthentication ( this request ) : bool

Examines the request to see if the current file needs to be authenticated

Because IIS7 runs in integrated mode, non aspx files are handled by the ASP.NET runtime. This function allows us to specify a list of file types that are safe to ignore. This function can be used to prevent expensive authentication logic from being executed for static files.

Method Details

IsStaticFile() public static method

Examines the request to see if the current file is a static file (i.e. .htm, .css, .js)
public static IsStaticFile ( this request ) : bool
request this /// The current HttpRequest ///
return bool

RequiresAuthentication() public static method

Examines the request to see if the current file needs to be authenticated
Because IIS7 runs in integrated mode, non aspx files are handled by the ASP.NET runtime. This function allows us to specify a list of file types that are safe to ignore. This function can be used to prevent expensive authentication logic from being executed for static files.
public static RequiresAuthentication ( this request ) : bool
request this /// The current HttpRequest ///
return bool