Web.config and setting up virtual subdirectories
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.

Mark Robson
Dear all,
    I want to arrange a situation such that a given path goes to a given http
handler, and all its subdirectories, for example

http://myserver/index.html -> goes to normal file
http://myserver/whatever.aspx -> handled as ASPX file
http://myserver/htest/x -> Goes to handler
http://myserver/htest/x/y/z/anything/else/at/all -> also goes to handler

I have succeeded in making http://myserver/htest/anything go to the handler,
however if there is a further slash, for instance has
http://myserver/htest/x/y, then the handler isn't invoked.

I have the following in my web.config, which works for the cases above, but
not others:

<add verb="*" path="htest/*" type="HandlerTest.MarksHandler,HandlerTest"/>

Has anyone done this before? Is there a way that I can say "and all
subdirectories" in the web.config?

Cheers
    Mark

Reply to this message...
 
    
Michel Comeau (VIP)
Hi Mark,

The current problem I see with HttpHandlers is that they don't handle
everything, only whatever is registered as using the .NET ISAPI
extension. They have an ISAPI filter but from what I could tell, its
simply useless. I wonder why its added as an ISAPI filter considering it
doesn't behave like one. But them again, maybe I'm missing something or
there is something I don't understand.

Michel C.

-----Original Message-----
From: Mark Robson [mailto:Click here to reveal e-mail address]
Sent: Friday, November 23, 2001 11:33 AM
To: aspnghttphandlers
Subject: [aspnghttphandlers] Web.config and setting up virtual
subdirectories

Dear all,
    I want to arrange a situation such that a given path goes to a
given http handler, and all its subdirectories, for example

http://myserver/index.html -> goes to normal file
http://myserver/whatever.aspx -> handled as ASPX file
http://myserver/htest/x -> Goes to handler
http://myserver/htest/x/y/z/anything/else/at/all -> also goes to handler

I have succeeded in making http://myserver/htest/anything go to the
handler, however if there is a further slash, for instance has
http://myserver/htest/x/y, then the handler isn't invoked.

I have the following in my web.config, which works for the cases above,
but not others:

<add verb="*" path="htest/*"
type="HandlerTest.MarksHandler,HandlerTest"/>

Has anyone done this before? Is there a way that I can say "and all
subdirectories" in the web.config?

Cheers
    Mark

| [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