HTTP Modules & Handlers or ISAPI?

  • Thread starter Thread starter PCC
  • Start date Start date
P

PCC

I need to be able to redirect web requests from certain parties to specific
content. In the old days I would have used ISAPI to do this. Now days I am
wondering if I should be doing this using HTTP Modules & Handlers or ISAPI.
All the machines are running IIS6 and have the .NET framework installed. In
the end I would like to code in C# but am concerned about the performance
cost of using HTTP Modules & Handlers over that of just using ISAPI. On
thing I thought of was using ISAPI and then just called code I have written
in C#, but then I have the performance hit of marshalling.



Would you please share your thoughts here? What is the best and fastest way
to do this (in any language)? What is the best and fastest way to do this
using C#, and how bad will the performance hit I take be? Any suggestions,
articles, links, samples, etc. would be greatly appreciated. Thank you.
 
Hi,

I think HTTP handlers are the managed way to go. They of course will be
little bit slower than properly designed ISAPI, but since they are compiled
into managed code, I don't think there will be performance penalty.
 
PCC,

If you want the ultimate in performance, then you will probably want to
use an ISAPI dll. While I won't comment on whether or not C++ is faster
than C# (that's for another time), you will not have the overhead of the
marshaling of information from the managed to the unmanaged world.

However, I would generally consider this to be an acceptable hit in
order to take advantage of the framework. I would use HTTP Handlers and
Modules (you would use a handler for what you are doing).

Hope this helps.
 
Thanks you guys. I feel better knowing that others think I should use C#
and the framework. I was terrified that people in my shop would be shocked
that I had not used ISAPI. Thanks again.

PS - Nicholas Paldino, I swear you have answered at least fifty of my posts
over the years. Thank you for your contribution.
 
Back
Top