Get Started!

HTTP Modules

A HTTP Module will allow you to pass every request through some common server logic, to say stamp a custom header, rewrite the response, etc.

Unlike the HTTP Handlers, which are bound to certain requested URL patterns and only execute if they match, HTTP Modules will capture every request.


As they execute on every request, performance should be a primary concideration. Typically, caches with HashMaps, Dictionaries and in-memory Data Collections are used to gain maximum performace, along with ending / returning from the main stack as soon as possible.

Register Module with DynAssDelegateModule.RegisterAction

The DynAssDelegateModule.RegisterAction method recives a string used as a key for the specific module and an Action<HttpApplication>, containng the main body of the module.


  string key,
  Action<HttpApplication> action



  // Key / Ident for Module

  // The main thread for the module
  (httpApp) => {

    // Do Somthing...



Adding a Custom Header -

  • Stamping the Headers with X-Hello: World

Rewrite or Redirect Old Site Links -

  • Using HTTP Modules to Redirect & Rewite Urls