473,386 Members | 1,702 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,386 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 1573

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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...

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.