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.
-Brock
DevelopMentor
http://staff.develop.com/ballen 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?
"Rick Strahl [MVP]" wrote:
Hi Samuel,
APP_CODE code generates into a fixed filename of APP_CODE.DLL so you
can use that name for the assembly in the Web apps bin directory.
+++ Rick ---
--
Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog
"Samuel" <pr********@nospam.nospam> wrote in message
news:90**********************************@microsof t.com...
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.