Dynamic HttpHandler mapping... possible?

G

Gabriel Lacatus

Is it possible to map a URL to a specific HttpHandler programatically?
What I mean is that I wouldn't have to go in the web.config section and add
the line
<add verb="*" path="foo.bar" type="BarHttpHandler, FooBar"/>.
Instead I would like to do this programatically in another handler's code
for example.

Cheers
 
S

Steven Cheng[MSFT]

Hi Cabriel,

Welcome to the ASPNET newsgroup.

Regarding on the ASP.NET Httphandler mapping, we can only configure it
through the web.config file statically, so far there is not
dyanmic/programmatic configure interfaces. BTW, what's the actual task you
want to achieve, if you want to make some certain incoming request
dynamically be redirected to some other specified handler/extension for
processing, I suggest you have a look at the ASP.NET's Url Rewriting
feature:

#URL Rewriting in ASP.NET
http://msdn.microsoft.com/library/en-us/dnaspp/html/urlrewriting.asp?frame=t
rue

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top