Dynamically Loading Custom Http Modules

Discussion in 'ASP .Net' started by Cramer, Apr 4, 2008.

  1. Cramer

    Cramer Guest

    Here is what I plan to do (the question follows the description):

    My intent is to have a custom HTTP module dynamically determine which
    classes should handle various pipeline events. We'll call this the "loader
    module". The loader module then (1) loads the assemblies that house the
    other classes, instantiating the requisite object; then (2) wires up the
    requisite pipeline event to the corresponding event handling method of the
    class instantiated from the dynamically loaded assembly.

    The idea here is that I can, for example, have a few different classes (each
    in its own assembly) that can handle specific HTTP pipeline events (like
    BeginRequest or AuthenticateRequest) - and then have one of those classes
    process that event during all future requests. This would allow me to have,
    for example, multiple custom authentication mechanisms - each implemented in
    its own class and assembly, one of which is then plugged into the
    application by my custom HTTP module.

    My question:
    Will this even work? FWIW: I know how to dynamically load assemblies and
    instantiate classes from them. I'm just not understanding the mechanism in
    ASP.NET that would call my custom HTTP module (the "loader module") - which
    needs to be called only once; yet call the dynamically loaded Request
    processing module(s) for every single request (to handle, for example, the
    AuthenticateRequest event).

    Thanks.
     
    Cramer, Apr 4, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mallik
    Replies:
    0
    Views:
    401
    mallik
    Aug 9, 2004
  2. Remy Cool
    Replies:
    1
    Views:
    448
    Remy Cool
    Aug 27, 2003
  3. Farooq Khan

    dynamically loading custom control????

    Farooq Khan, Dec 24, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    137
    Michel
    Dec 24, 2003
  4. Andrei Coler

    Custom HTTP Modules and Web Services

    Andrei Coler, Aug 20, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    114
    Andrei Coler
    Aug 20, 2003
  5. stig

    dynamically loading perl modules

    stig, Dec 30, 2006, in forum: Perl Misc
    Replies:
    1
    Views:
    89
    Marc Espie
    Jan 2, 2007
Loading...

Share This Page