HTTP Modules & Handlers or ISAPI?

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.
 
D

Dmitriy Lapshin [C# / .NET MVP]

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
P

PCC

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.
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top