HTTPModule and App_code ASP.NET 2.0

G

Guest

nHi,

is it possible to add pure code to APP_Code folder to act as an HTTPModule?
If so, how do I reference it in web.config? I know global.asax is the place
for such thing but I am just wondering.
 
G

Guest

Thanks Rick for your help. It works well.

One question: what's the difference now for global.asax and httpmodules
created in app_code in terms of functionality? I know the way we code the two
are different, but what's the main difference now for the two methods in .net
2.0?
 
B

Brock Allen

HttpModules and code in global.asax can handle any per-request events fired
by the HttpApplication (like BeginRequest, EndRequest, etc). Only global.asax
can handle Application_Start, Application_End, Session_Start and Session_End.
global.asax is only deployed in the root of your virtual directory whereas
modules are packaged as assemblies so they can be deployed to ~/bin or in
the GAC. Modules can be configured machine or site wide as well.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top