How to register an HttpModule that is not in the App_code folder

I would like to have my code for an HttpModule somewhere else than in the App_code folder, is that possible?

EDIT: For now, i have my module in a class file in the App_code folder of my web application. I'm successfuly registering it with this line in my web.config

  <add name="myModule" type="myModule,App_code"/>

What i would like to do is being able to put my class file somewhere else than in the Ape_code folder. Something like :

  <add name="myModule" type="myModule, myOtherFolder"/>


So, finaly, here's how I solved my problem. I found that to register an HttpModule, you have to use the foollowing syntax.

  <add name="MyModuleName" type="MyApplicationNamespace.MyModuleNamespace.MyModuleClassName, MyApplicationAssemblyName"/>


  • MyModuleName is not restrictive, it is used by the application to reference the module
  • Since MyApplicationName and MyApplicationAssemblyName is often the same (it is in my case), it is probable that the syntax above isn't totaly acurate.

Hope this can help someone else.

Yes, it is possible. You'll have to switch from "Web Site Project" to "Web Application Project." Here are a few resources to get you started:

Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio

Web Application Projects versus Web Site Projects

Introduction to Web Application Projects

ASP.NET: Web Site or Web Application?

Need Your Help

How do I use a return value straight from a function as a bitstring instead of a formatted number?

c floating-point int type-conversion bitstring

How do I get the effect of intVariable = *(int*) &amp;floatVariable straight from a function instead of having to save the output of the function to a dummy variable first?

JAX-WS Remove 'ns' prefix of xml tag

soap jax-ws

How can I remove or rename 'ns2' prefix here: