473,698 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Http Handlers

Hello,

I have been using Http handlers and I have two questions:

1. What does Property IsReusable really does and when should I use it?

2. And why should I add an httpHandler to my Web.Config?

<configuratio n>
<system.web>
<httpHandlers >
<add verb="*" path="handler.a spx"
type="HandlerEx ample.MyHttpHan dler, HandlerTest"/>
</httpHandlers>
</system.web>
</configuration>

I am asking this because I got all this working without using 1 or
2.

Thank You,

Miguel

Oct 17 '06 #1
3 1597

shapper wrote:
Hello,

I have been using Http handlers and I have two questions:
>
2. And why should I add an httpHandler to my Web.Config?

<configuratio n>
<system.web>
<httpHandlers >
<add verb="*" path="handler.a spx"
type="HandlerEx ample.MyHttpHan dler, HandlerTest"/>
</httpHandlers>
</system.web>
</configuration>

I am asking this because I got all this working without using 1 or
2.

Thank You,

Miguel
1. What does Property IsReusable really does and when should I use it?
The IsReusable property lets ASP.NET know if it can reuse an instance
of an HttpHandler or if it needs to re-create it from scratch each
time.
2. And why should I add an httpHandler to my Web.Config?
As far as I know and according to MSDN Documentation "After you have
created a custom HTTP handler class, you must register it in the
Web.config file. This allows ASP.NET to call the handler to service
requests made to resources with the file name extension that you want
the HTTP handler to process."
Either way, you still need to have the handlers registered.
So, there is something really strange in here. Are you sure you're
running the handler you created ? Have you debugged it ?

HTH
Felipe Garcia

Oct 17 '06 #2
If you mean running the handler putting the address
"http://www.mydomain.co m/MyHandler.ashx" so yes.

I did that and it works fine. I get the result I expect which is a XML
file displayed on my browser.

If run means running the handler from my VB / C# then I did not tried
it because I don't know why but I would like to know. :-)

Thanks,
Miguel

rhossi wrote:
shapper wrote:
Hello,

I have been using Http handlers and I have two questions:

2. And why should I add an httpHandler to my Web.Config?

<configuratio n>
<system.web>
<httpHandlers >
<add verb="*" path="handler.a spx"
type="HandlerEx ample.MyHttpHan dler, HandlerTest"/>
</httpHandlers>
</system.web>
</configuration>

I am asking this because I got all this working without using 1 or
2.

Thank You,

Miguel
1. What does Property IsReusable really does and when should I use it?
The IsReusable property lets ASP.NET know if it can reuse an instance
of an HttpHandler or if it needs to re-create it from scratch each
time.
2. And why should I add an httpHandler to my Web.Config?

As far as I know and according to MSDN Documentation "After you have
created a custom HTTP handler class, you must register it in the
Web.config file. This allows ASP.NET to call the handler to service
requests made to resources with the file name extension that you want
the HTTP handler to process."
Either way, you still need to have the handlers registered.
So, there is something really strange in here. Are you sure you're
running the handler you created ? Have you debugged it ?

HTH
Felipe Garcia
Oct 17 '06 #3
Just to add to Felipe's reply...

You can return true from IsReusable f you aren't disposing or closing any
resources which need to be open to handle requests.

As for adding it to the web.config, I don't see how that can work WITHOUT
adding it...strange...

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"shapper" <md*****@gmail. comwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
If you mean running the handler putting the address
"http://www.mydomain.co m/MyHandler.ashx" so yes.

I did that and it works fine. I get the result I expect which is a XML
file displayed on my browser.

If run means running the handler from my VB / C# then I did not tried
it because I don't know why but I would like to know. :-)

Thanks,
Miguel

rhossi wrote:
>shapper wrote:
Hello,

I have been using Http handlers and I have two questions:
>
2. And why should I add an httpHandler to my Web.Config?

<configuratio n>
<system.web>
<httpHandlers >
<add verb="*" path="handler.a spx"
type="HandlerEx ample.MyHttpHan dler, HandlerTest"/>
</httpHandlers>
</system.web>
</configuration>

I am asking this because I got all this working without using 1 or
2.

Thank You,

Miguel
1. What does Property IsReusable really does and when should I use it?
The IsReusable property lets ASP.NET know if it can reuse an instance
of an HttpHandler or if it needs to re-create it from scratch each
time.
2. And why should I add an httpHandler to my Web.Config?

As far as I know and according to MSDN Documentation "After you have
created a custom HTTP handler class, you must register it in the
Web.config file. This allows ASP.NET to call the handler to service
requests made to resources with the file name extension that you want
the HTTP handler to process."
Either way, you still need to have the handlers registered.
So, there is something really strange in here. Are you sure you're
running the handler you created ? Have you debugged it ?

HTH
Felipe Garcia

Oct 17 '06 #4

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

Similar topics

3
5272
by: Jeff Shannon | last post by:
I'm having some difficulty getting my logging configuration set correctly. I'm using a config file (copied at end of post), with the intent of setting several loggers which write to a combination of a file, stderr (for debugging), and the NT Eventlog, but I don't seem to be getting the right combination of handlers called. The desired combinations are as follows: root - Eventlog, stderr log02 - file, stderr
0
1251
by: Vinay Sajip | last post by:
Currently, if the logging module is used with no handlers configured for a logger or its parents and you try to log events with that logger, a single message is printed to sys.stderr: No handlers could be found for logger <logger name> It has been suggested that this puts out a spurious message when, for whatever reason, a developer intentionally does not configure any handlers. A good use case for this is when writing a library...
10
3592
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script language="JavaScript" type="text/javascript"> function show(that) { if (box.style.visibility=='hidden') { that.style.visibility = 'visible'}; }
3
1735
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
2432
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...
9
20168
by: Charles Law | last post by:
I have a form on which user controls are placed at runtime. When a control is added to the form a handler is added for an event that a high-level object raises, which must be handled by the new control. When I close the form I am expecting that the control ceases to be. However, if my object raises the event after the form has been closed, I find that there is still a user control object that handles it. Clearly the user control has not...
16
2509
by: Hamed | last post by:
Hello I am developing a utility to be reused in other programs. It I have an object of type Control (a TextBox, ComboBox, etc.) that other programmers use it in applications. they may set some of properties or assign event handlers. I need to be able to clone the manipulated control at runtime. I could use the Clone method of some objects (like Font, Style, String,
14
8617
by: Hamed | last post by:
Hello It seems that I should implement ICloneable to implement my own clone object. the critical point for me is to make a control object based on another control object that all of its event handlers are set like the old one. Is there a way to do this job? For example, is there a way to use EventInfo object to get all event handlers of the old control in runtime and set my new cloned control events to the event handlers of the old...
3
11546
by: Chris Shenton | last post by:
I am setting up handlers to log DEBUG and above to a rotating file and ERROR and above to console. But if any of my code calls a logger (e.g., logging.error("foo")) before I setup my handlers, the logging system will create a default logger that *also* emits logs, which I can't seem to get rid of. Is there a way I can suppress the creation of this default logger, or remove it when I 'm setting up my handlers? Thanks. Sample code:
0
8673
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
9156
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
9021
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7716
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3043
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
3
1998
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.