By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,286 Members | 2,364 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,286 IT Pros & Developers. It's quick & easy.

wildcard httphandler and iis

P: n/a
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.
May 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

--
Regards

John Timney
Microsoft MVP

"Jan Kucera" <ua*@centrum.cz> wrote in message
news:ur**************@TK2MSFTNGP04.phx.gbl...
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.

May 4 '06 #2

P: n/a
http://blogs.msdn.com/david.wang/arc...cs_Part_1.aspx
http://blogs.msdn.com/david.wang/arc...esolution.aspx
http://blogs.msdn.com/david.wang/arc...hing_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.
//

"John Timney ( MVP )" <ti*****@despammed.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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.

--
Regards

John Timney
Microsoft MVP

"Jan Kucera" <ua*@centrum.cz> wrote in message
news:ur**************@TK2MSFTNGP04.phx.gbl...
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.


May 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.