wildcard extension ASP.Net httphandler gives 401.3 ACL permission denied error on a directory

From: Ken Yee (kenkyee_at_yahoo.com.SPAMGUARD)
Date: 10/07/05


Date: Thu, 06 Oct 2005 15:30:05 -0700

First a little background: I've written an httphandler to handle wildcard
extensions (i.e., I want to handle all URLs that come in rather than just
URLs w/ a specific file extension so I can give friendly names to various
dynamic web pages). To do this, I've written an httphandler and put it
in the web.config for my webapp (stored in the wwwroot\webapp directory).
It works great for the most part; I get to handle any URLs below my
webapp directory.

The problem is, when I use a URL that references the directory, IIS seems
to be prompting for a username/password (it's set to use anonymous and
Windows authentication). If I turn off Windows authentication, I just
get a 401.3 error code.

I used sysinternal's FileMon program and can see the aspnet process
trying to access \inetpub\wwwroot\webapp and that's why it's getting the
error. If I do a FileMon trace w/ wildcard extensions turned off, it's
the inetinfo process that accesses the \inetpub\wwwroot\webapp directory
instead of the aspnet process. I've tried adding the ASPNET user to
this directory w/ no luck. I've also tried logging in as a real user w/
admin access when the prompt comes up w/ no luck. I've tried adding a
default home document in IIS (e.g., default.aspx) so it should try
loading that if it hits that directory, but it doesn't do it. I put a
breakpoint in my custom httphandler and it never reaches it, so the
problem is definitely happening in the aspnet process; it also happens in
Win2K/XP/2003, so it's not operating system specific. If I access a URL
that would map to any real directory (e.g. localhost/webapp/subdir where
the \inetpub\wwwroot\webapp\subdir directory exists), it also prompts, so
this seems to only happen if the URL maps to a real directory.

Any clues on what I should try next?
Or is this just a bug in ASP.Net? :-(
There's very little documentation on writing wildcard httphandlers...

 thanks,

 ken
 (remove .SPAMGUARD to reply to email)



Relevant Pages

  • wildcard extension ASP.Net httphandler gives 401.3 ACL permission denied error on a directory
    ... I've written an httphandler to handle wildcard ... I used sysinternal's FileMon program and can see the aspnet process ... If I do a FileMon trace w/ wildcard extensions turned off, ...
    (microsoft.public.dotnet.security)
  • Re: wildcard extension ASP.Net httphandler gives 401.3 ACL permission denied error on a directory
    ... what have you set "verify if file exists" in the wildcard mapping? ... > anonymous and Windows authentication). ... > directory instead of the aspnet process. ... I put a breakpoint in my custom httphandler and it ...
    (microsoft.public.dotnet.security)
  • Re: Set file name returned from ASP.NET page by URL
    ... An HttpHandler is a class that handles HTTP requests. ... You can map different file extensions to different HttpHandlers ... The HttpHandler is a clsss that handles the request. ... >> file and get back whatever the handler returns. ...
    (microsoft.public.dotnet.framework.aspnet)
  • HttpHandlers, ViewState & Posts?
    ... I've got a strange problem - all extensions on my IIS6 are mapped to ... and I've got an HttpHandler that supposed to get all the calls. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to get a handler for a path
    ... extensions (or wildcard) they want to handle. ... any given path/verb so that I can know if that's mine and handle specially. ... Is my understanding correct that: ... You don't know how the users of HttpHandler set their web.config and CAS ...
    (microsoft.public.dotnet.framework.aspnet)