Ask a Question related to ASP.NET General, Design and Development.
-
Simen #1
Re: httpHandlers path config limitation
How about using httpmodule instead of httphandler?
On 23 Jul 2003 11:58:45 -0700, Jason Chen <jason.chen@multex.com> wrote:
> hello, when registering httpHandlers, I can specify a path to match,
> like following:
> <add verb="*" path="/secure/*.xml"
> type="System.Web.HttpForbiddenHandler" />
> this will protect all xml files under /secure directory.
> but it will not protect xml files under subdirectories of /secure/
> directory.
> for example /secure/sub1/a.xml is not protected
> changing the config to <add verb="*" path="/secure/*/*.xml"
> type="System.Web.HttpForbiddenHandler" />
> will result the server hanging, when .NET Framework matches path, it
> just couldn't understand path="/secure/*/*.xml"
> there are 3 work arounds I can think of, 1. specify each sub directory
> respectively, as following
> <add verb="*" path="/secure/sub1/*.xml"
> type="System.Web.HttpForbiddenHandler" />
> <add verb="*" path="/secure/sub2/*.xml"
> type="System.Web.HttpForbiddenHandler" />
> ....
> this won't work out if you have many sub directories or if you
> have dynamic sub directories generated.
> 2. ignore the path, just register all xml files as following <add
> verb="*" path="*.xml" type="System.Web.HttpForbiddenHandler" />
> and in the handler, find out the path, do the path matching yourself,
> using this solution, you have to serve files that you don't want to.
>
> any comments on this ?
>
--
Using M2, Opera's revolutionary e-mail client: [url]http://www.opera.com/m2/[/url]
Simen Guest
-
Custom HttpHandlers and Declarative Security
Hello All, I am using maverick.net (a framework based around a custom httphandler in ASP.NET) and I'm trying to integrate declarative security... -
Error loading XML file c:\windows\microsoft.net\framework\v1.0.3705\Config\machine.config
I had many ASP.NET web applications that I created before I had to rebuild my machine. After a fresh install of XP Pro, VS.NET 2003, etc, I now... -
#25466 [Opn->Bgs]: PHP ignores --with-config-file-path compile option somehow?
ID: 25466 Updated by: sniper@php.net Reported By: php-bugs-2003-09 at webfreezer dot com -Status: Open... -
#25466 [NEW]: PHP ignores --with-config-file-path compile option somehow?
From: php-bugs-2003-09 at webfreezer dot com Operating system: Linux PHP version: 4.3.3 PHP Bug Type: PHP options/info... -
Using httpHandlers to allows access to mp3 files
Hi there I need to allow users to download mp3 files after they have paid for them. Is it possible to use httpHandlers to control access to the... -
Jason Chen #2
Re: httpHandlers path config limitation
thanks for your reply.
using a httpModule can do the trick as well, just like other
workarounds,
it's not how it suppose to work.
I guess I'd like to question why microsoft introduced the path
matching implementation like this, can't they just allow a simple
regular expressiion
matching here ?
Simen <shagelid@hotmail.com> wrote in message news:<oprss25my9bfuc92@msnews.microsoft.com>...> How about using httpmodule instead of httphandler?
>
> On 23 Jul 2003 11:58:45 -0700, Jason Chen <jason.chen@multex.com> wrote:
>Jason Chen Guest



Reply With Quote

