Search code examples
c#asp.netvb.nethttpmodule

Is a HTTP Module as non-external dll possible in ASP.NET?


Question:

Normally, when you create a HTTP module, you create it as separate dll project and register that dll in the web.config.

Now, is it possible to write a HTTP module directly in an ASP.NET project, so I don't have to create a separate dll project?

Note: Don't say as an added project in the same solution, I mean in the same project.

Or would just adding a reference to this dll suffice ?


Solution

  • I think that you can, you place your code/class inside the app_code directory, and that's all.

    You then register it by his namespace and the class name on the web.config.