C# Class BlogEngine.Core.Web.HttpHandlers.FileHandler

The FileHandler serves all files that is uploaded from the admin pages except for images.
By using a HttpHandler to serve files, it is very easy to add the capability to stop bandwidth leeching or to create a statistics analysis feature upon it.
Inheritance: IHttpHandler
Show file Open project: rasmuskl/ReSharperCourse

Public Methods

Method Description
ProcessRequest ( HttpContext context ) : void

Enables processing of HTTP Web requests by a custom HttpHandler that implements the interface.

Private Methods

Method Description
OnBadRequest ( string file ) : void

Called when [bad request].

OnServed ( string file ) : void

Called when [served].

OnServing ( string file ) : void

Called when [serving].

SetContentType ( HttpContext context, string fileName ) : void

Sets the content type depending on the filename's extension.

Method Details

ProcessRequest() public method

Enables processing of HTTP Web requests by a custom HttpHandler that implements the interface.
public ProcessRequest ( HttpContext context ) : void
context System.Web.HttpContext /// An /// object that provides references to the intrinsic server objects /// (for example, Request, Response, Session, and Server) used to service HTTP requests. ///
return void