473,606 Members | 2,381 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTP Modules & Handlers or ISAPI?

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.
Nov 15 '05 #1
3 1732
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.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"PCC" <pc*****@hotmai l.com> wrote in message
news:eg******** ******@TK2MSFTN GP12.phx.gbl...
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.


Nov 15 '05 #2
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"PCC" <pc*****@hotmai l.com> wrote in message
news:eg******** ******@TK2MSFTN GP12.phx.gbl...
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.

Nov 15 '05 #3
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.

"PCC" <pc*****@hotmai l.com> wrote in message
news:eg******** ******@TK2MSFTN GP12.phx.gbl...
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.

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1998
by: Chris Hughes | last post by:
I have an environment with many thousands of client machines uploading data files several times each day to a web server via HTTP PUT. To avoid disk I/O (for performance), I am implementing a HTTP handler to intercept and process incoming data without touching the disk. I cannot detect PUT requests with my handler (don't know if this is even supported), so I'm redirecting all requests to the handler as POST using an ISAPI filter. I...
3
1296
by: Steven Livingstone | last post by:
Hello all. I have a class that modifies the response sent to a user, but it works as far as the ReleaseRequestState event and not in the UpdateRequestCache event. So two questions : 1. Background on exactly what and why this is the case would be useful. I mean something more than "This event signals that code processing is complete and the file is ready to be added to the ASP.NET cache." - i'd like to know exactly what is happening...
3
1267
by: PCC | last post by:
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...
2
2419
by: Norton | last post by:
I understand how to create HTTP modules that can be used to add functionality to a website but there are a few things I don't understand. If I create an HTTP Module and I want it to intercept a call to AuthenticateRequest, I know that in my init function for my HTTP module, I can add a handler to this method name and then use this event handler delegate to call my own function. I saw some sample code though that mentioned (for some...
2
2040
by: Norton | last post by:
I had a person tell me the other day that a person would not be able to beat the efficiency of an ISAPI dll, especially by using handlers/modules. Of course, they could only say the reason was that it is written in C++, which should have nothing to do with it. But, in general, can you write a handler that will handle just as many connections as an ISAPI dll? Isn't a handler a managed code answer to the ISAPI dll solution? Thanks.
9
1567
by: Tim Payne | last post by:
If I were writing an HTTP module where I wanted to access the response text that was being sent back to the user, what would be the optimum method for doing this within the module? I'm investigating the viability of using this for logging some info, and I'm wondering if there are any established or best practice methods for doing this that will minimise the performance hit on the server? Regards, Tim.
7
2620
by: John Murtari | last post by:
Folks, We would like to upgrade our servers to PHP 5 and PHP 4 together as modules on the same server (not as cgi, not passing requests to another server). I did some extensive searching on this and we ran some tests over a year ago and did not find a solution (other than proxy forwarding to a PHP 5 configured server). When PHP went to version 4 from version 3, it was possible to run both at the same time, and have users select by...
9
5035
by: Andy Fish | last post by:
Hi, I am wondering if there is any way to log the HTTP traffic on an IIS server (including headers but preferably the body as well), either at the IIS or asp.net level I know I could write my own isapi dll or .net filter, but I was rather hoping someone else has already done it. I'm sure it's quite a common requirement
3
2806
by: Ramesh | last post by:
Hi, I am trying to create an array of pointers to member functions inside my class. When I created a global array of type pfn & initialized with member functions and copy it back to the member function pointer array (Handlers) - compiler doesnt let me do that. I got an error as below: "invalid use of non-static member function bool test::func1(long int)"
0
8016
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7955
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8440
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
5466
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3937
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2448
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1557
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1300
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.