473,408 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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?

<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="handler.aspx"
type="HandlerExample.MyHttpHandler, 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 1574

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?

<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="handler.aspx"
type="HandlerExample.MyHttpHandler, 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.com/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?

<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="handler.aspx"
type="HandlerExample.MyHttpHandler, 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*********************@i3g2000cwc.googlegrou ps.com...
If you mean running the handler putting the address
"http://www.mydomain.com/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?

<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="handler.aspx"
type="HandlerExample.MyHttpHandler, 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
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...
0
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...
10
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...
3
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...
2
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...
9
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...
16
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...
14
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...
3
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.