how to register a IHttpHandler in runtime

G

Guest

Hi all,

Sorry to double post but my other post in dotnet.framework.webservices has
had no replies. Maybe I'll have more luck in this group.

Here's what I'm trying to do:

I made a class library in .net 2.0 beta2 that contains a webcontrol. When
this webcontrol is used, I want to add a custom IHttpHandler for a certain
request path, let's say "MyControl.xmlx", in order to allow the webcontrol to
do client side XML data requests.
I tried adding the handler to the WebConfiguration for
'web.config/httpHandlers' in the Load event of the control. However I suspect
this change is discarded as soon as the load event handler goes out of scope.
Also, calling Save on the configuration is not an option since the handler
should not persist outside of the lifespan of the current Application object.
That and the web.config is read only in almost all cases.


To make a long story short, it all boils down to this one question: how can
I tell the current web Application to use my HttpHandler without using the
web.config file?

Is this even possible?

Bas Tossings
CityGIS Homeland Security
The Netherlands
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top