Adding a handler at runtime
Messages   Related Types
This message was discovered on ASPFriends.com 'aspnghttphandlers' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Instead of adding a handler via an entry in the web.config file. Is it
possible to add a httphandler in code at runtime ?
If so how is it done ?
Michael Lang
MS.NET Developer
http://www.michaellang.com.au
Reply to this message...
 
    
Tim Heuer (VIP)
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--------------InterScan_NT_MIME_Boundary
Content-Type: multipart/alternative;
    boundary="----_=_NextPart_001_01C1B81B.380ABC60"

------_=_NextPart_001_01C1B81B.380ABC60
Content-Type: text/plain

Maybe I'm thinking wrong here, but if you add a handler at runtime, that
would defeat the purpose...an httphandler is executed/used before the
runtime code (where you would add it) gets executed...an httphandler acts
more like an ISAPI filter...

-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]
Sent: Sunday, February 17, 2002 5:14 PM
To: aspnghttphandlers
Subject: [aspnghttphandlers] Adding a handler at runtime

Instead of adding a handler via an entry in the web.config file. Is it
possible to add a httphandler in code at runtime ?
If so how is it done ?

Michael Lang
MS.NET Developer
http:// <http://www.michaellang.com.au/" target="_blank">http://www.michaellang.com.au/> www.michaellang.com.au
<http://www.michaellang.com.au/" target="_blank">http://www.michaellang.com.au/>

| [aspnghttphandlers] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspnghttphandlers.asp = JOIN/QUIT
| http://www.asplists.com/search" target="_blank">http://www.asplists.com/search = SEARCH Archives

------_=_NextPart_001_01C1B81B.380ABC60
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=828221501-18022002><FONT face=Arial color=#0000ff size=2>Maybe
I'm thinking wrong here, but if you add a handler at runtime, that would defeat
the purpose...an httphandler is executed/used before the runtime code (where you
would add it) gets executed...an httphandler acts more like an ISAPI
filter...</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
Click here to reveal e-mail address [mailto:Click here to reveal e-mail address] <BR><B>Sent:</B>
Sunday, February 17, 2002 5:14 PM<BR><B>To:</B>
aspnghttphandlers<BR><B>Subject:</B> [aspnghttphandlers] Adding a handler at
runtime<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>
<DIV><SPAN class=306513223-17022002><FONT face=Arial size=2>Instead of adding
a handler via an entry in the web.config file.  Is it possible to
add a httphandler in code at runtime ?</FONT></SPAN></DIV>
<DIV><SPAN class=306513223-17022002><FONT face=Arial size=2>If so how is it
done ?</FONT></SPAN></DIV>
<P><FONT face=Arial size=2>Michael Lang</FONT> <BR><FONT face=Arial
size=2>MS.NET Developer</FONT> <BR><FONT face=Arial size=2><A
href="http://www.michaellang.com.au/" target="_blank">http://www.michaellang.com.au/">http://<A
href="http://www.michaellang.com.au/" target="_blank">http://www.michaellang.com.au/">www.michaellang.com.au</A></A></FONT></P>
<DIV> </DIV></FONT></DIV></FONT></DIV>| [aspnghttphandlers] member
Click here to reveal e-mail address = YOUR ID<BR>|
http://www.asplists.com/asplists/aspnghttphandlers.asp = JOIN/QUIT<BR>|
http://www.asplists.com/search" target="_blank">http://www.asplists.com/search = SEARCH Archives<BR></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C1B81B.380ABC60--

--------------InterScan_NT_MIME_Boundary--

Reply to this message...
 
    
Michael Lang
MessageI wouldn't say you're thinking wrong at all.... I was thinking
perhaps that it might be possible to add handlers programatically at some
point when the application is starting up... perhaps as a call from the
global.asax file.

That way it would be possible to make a single call to a reusable component
to set up a set of default handlers that could be reused across several web
applications.

-----Original Message-----
From: Tim Heuer [mailto:Click here to reveal e-mail address]
Sent: Monday, 18 February 2002 12:26 PM
To: aspnghttphandlers
Subject: [aspnghttphandlers] RE: Adding a handler at runtime

Maybe I'm thinking wrong here, but if you add a handler at runtime, that
would defeat the purpose...an httphandler is executed/used before the
runtime code (where you would add it) gets executed...an httphandler acts
more like an ISAPI filter...
-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]
Sent: Sunday, February 17, 2002 5:14 PM
To: aspnghttphandlers
Subject: [aspnghttphandlers] Adding a handler at runtime

Instead of adding a handler via an entry in the web.config file. Is it
possible to add a httphandler in code at runtime ?
If so how is it done ?
Michael Lang
MS.NET Developer
http://www.michaellang.com.au

| [aspnghttphandlers] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspnghttphandlers.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
 




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com