C# Class UrlModule, IowaCodeCamp

Removes or adds the www subdomain from all requests and makes a permanent redirection to the new location.
Inheritance: IHttpModule
Exibir arquivo Open project: IowaCodeCamp/IowaCodeCamp Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Disposes of the resources (other than memory) used by the module that implements .

Init ( HttpApplication context ) : void

Initializes a module and prepares it to handle requests.

Private Methods

Method Description
AddWww ( HttpContext context ) : void

Adds the www subdomain to the request and redirects.

PermanentRedirect ( string url, HttpContext context ) : void

Sends permanent redirection headers (301)

RemoveWww ( HttpContext context ) : void

Removes the www subdomain from the request and redirects.

context_BeginRequest ( object sender, EventArgs e ) : void

Handles the BeginRequest event of the context control.

Method Details

Dispose() public method

Disposes of the resources (other than memory) used by the module that implements .
public Dispose ( ) : void
return void

Init() public method

Initializes a module and prepares it to handle requests.
public Init ( HttpApplication context ) : void
context HttpApplication An that provides /// access to the methods, properties, and events common to all application objects within an ASP.NET application
return void