views:

225

answers:

2

Has anyone seen any how-to, documentation, or otherwise about how to load HTTP Modules dynamically for IIS?

Basically what I am trying to do is to load HTTP Modules, which I'll call HTTPModuleA, HTTPModuleB, and HTTPModuleC. The modules however could be changed out at any time with HTTPModuleD, HTTPModuleE, or HTTPModuleF. I basically would like to put them in the config file, but don't want to have references or anything. I'd like to be able to merely have them dropped into a particular path (the dll of the assembly that is), set the config file entry for the file/path, and have Unity, or something other framework just pick them up and load them. Possibly scanning for changes every 2-3 minutes or something.

Any notions on how to get this done are much appreciated. Thx!

+1  A: 

Unity is NOT a way to dynamically load modules. You could look at the Microsoft Extensibility Framework to dynamically load modules, which I hear is great.

Personally I built a similar system and used an article on CodeProject for guideance, but I can't find it now. I did find this (which is similar) and shows how to use the file watcher which is nicer than polling every 2 or 3 min: http://www.codeproject.com/KB/cs/dynamicpluginmanager.aspx

Robert MacLean
A: 

You can drop assemblies in the /bin directory and have ASP.NET load a module without ever referencing the assemblies in your web application.

OdeToCode
How does one do that? Any pointers?
Adron
If the module is in foo.dll, then copy foo.dll into the bin directory of the application and add your module to the list of <httpModules> in sidethe web.config file.
OdeToCode