Re: ISAPI vs. HTTPModule by David
David
Wed Sep 22 14:17:57 CDT 2004
I cannot think of any particular link that puts it all together, but the
info is probably all out there somewhere if you search.
From IE as a client, you'd start with WinInet, then it hops into
kernel-mode, go over the network, and received by HTTP.SYS in kernel-mode,
which parses the request and dispatches it to IIS in usermode. IIS executes
the request, and extensibility points are accessed via ISAPI Filter (various
events that are triggered as the request is executed) until the URL
extension of the request is determined, and then sent to its handler.
Handlers are associated with extensions, and wildcard handlers are
associated with all extensions. What a request does AFTER it reaches a
handler (in this case, ASP.Net), is completely dependent on the handler and
its extensibility model.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"kat" <kat@discussions.microsoft.com> wrote in message
news:598E1A06-E8C7-43C2-934E-431B6B0418C9@microsoft.com...
Thank you so much for all your help. It has been very useful. Just one
more
question though, is there anywhere I can find detailed information on the
path a request takes from the client through HTTP.sys until it is sent to
the
handler?
Thanks,
kat
"David Wang [Msft]" wrote:
> ISAPI will not be able to access any .Net intrinsics/events. Nor does it
> make sense for .Net to notify the filter because an ISAPI Filter is
intended
> to react to IIS events -- your events are not IIS events, so you gain
> nothing from notifying the ISAPI.
>
> One approach you can try is to *-scriptmap aspnet_isapi.dll to all
> extensions -- so your HTTPModule is now invoked on every request to the
web
> server -- and you can do all the tracking/notification that you want in
> ..Net.
>
> The downside of this approach is that the namespace on your webserver
> handled by the *-scriptmap is only ASP.Net. For example, CGI, ISAPI
> Extensions, ASP, Perl, PHP, etc do not work in the namespace handled by
the
> *-scriptmap -- only ASP.Net pages and static files. This is because the
> *-scriptmap is *handling* all requests -- and ASP.Net doesn't know how to
> "handle" non-ASP.Net pages and hence they fail.
>
> This approach is fixed with Whidbey (in beta) and IIS6 where you can add
the
> *-scriptmap AND still have all the non ASP.Net pages/scripts work.
ASP.Net
> in Whidbey and IIS knows how to "pass-on" requests that it doesn't know
how
> to handle back to IIS, so that it can direct it to the correct handler.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "kat" <kat@discussions.microsoft.com> wrote in message
> news:3766C2E2-2EEA-4AB5-918B-0AE8A514C785@microsoft.com...
> The functionality that I want to get from the ISAPI that I know I can do
> with
> the HTTPModule is to register for all events that hit a webpage no matter
if
> it is html or aspx. I also want to have applications that are run from
the
> website notify the filter when it starts and when it finishes. I want to
> track all applications start and end events from a given website.
>
> Thanks,
>
> kat
>
> "David Wang [Msft]" wrote:
>
> > Can you fully describe the functionality you want and any requirements,
so
> > that people can better advise you on the technology(s) and
configurations
> > that best suite your need.
> >
> > --
> > //David
> > IIS
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > //
> > "kat" <kat@discussions.microsoft.com> wrote in message
> > news:2A702FDE-3795-4F65-A038-57D12EB2D9C3@microsoft.com...
> > Hi,
> >
> > I am trying to figure out the best way to implement some desired
> > functionality. From the .NET framework, I can access the
HTTPApplication
> > events onStart and onEnd. But I have to create wrappers for some
included
> > files. I currently have an ISAPI filter that includes those files. Is
it
> > possible that the ISAPI can access the onStart and onEnd events of the
> ..NET
> > framework? I can also register applications to the HTTPModule using the
> > config files. Is it possible to get that functionality in the ISAPI
> through
> > COM interop or something?
> >
> >
> >
>
>
>