wildcard httphandler and iis

J

Jan Kucera

Hi,
I have virtual MyFolder/* and MyFolder/MySubFolder/* mapped to an
httphandler in the web.config file and all works perfectly on the asp.net
development server.
However on the IIS6/Win2003 I'm getting 404 error, not even the asp.net one,
so I guess the IIS is blocking the request.

I would uncheck to verify that file exists if it would be for special
extension, but this is wildcarded so I don't know what to do... any
solution?

Thanks, Jn.
 
J

John Timney \( MVP \)

Your descriptions a bit vague but I'm guessing your problem exists only when
you are requesting a file path with no file named. If not ignore the rest
of my response. : )

Typically - (if I remember right) - When you map *, the asp.net runtime does
not get passed request for none existant file paths, so IIS can not find
anything to serve, nor a handler to pass the file request onto and will
throw a standard 404. Even default pages named in the application will not
be found unless you specifiy default.aspx - you need a filename. You will
need to compensate for this in your handler by checking the requested path
and amending it if no file name exists to a default one.
 
D

David Wang [Msft]

http://blogs.msdn.com/david.wang/ar...O_IIS_6_Request_Processing_Basics_Part_1.aspx
http://blogs.msdn.com/david.wang/ar..._can_disable_Default_Document_resolution.aspx
http://blogs.msdn.com/david.wang/ar...application_mapping_is_not_catching_404s.aspx

The checkbox "Check if file exists" controls whether the Application Mapping
is executed for non-existent file paths. It is checked by default, even for
Wildcard Application Mappings. Most people want that unchecked for Wildcard
Application Mappings.

Default pages do not resolve because Wildcard Application Mapping gets
invoked *before* Default Document resolution happens.

The reason this is all wonky is simple - there are two request processing
pipelines, IIS and ASP.Net. This is fixed in IIS7 when we properly merge
them into one comprehensive pipeline that finally allows you to extend IIS
with managed code the way you think it should work right now (but doesn't).

Search on my blog for more related tech articles about this.

--
//David
IIS
http://blogs.msdn.com/David.Wang
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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top