473,394 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

wildcard httphandler and iis

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
2 2867
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hanse Davion | last post by:
Can anyone provide some insight on what this problem could be? I have searched the web, read forums, and all the installation documentation for the dotnetnuke feeware portal from asp.net. I am...
3
by: Jed | last post by:
I have written an HttpHandler which I invoke through an ashx page. The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page. Everything...
4
by: Jeremy Lew | last post by:
When my HttpHandler is processing a request when installed on a particular 2003 Server machine, the Context.Session object is null. Any idea why this might be? My handler implements...
3
by: Ralf Müller | last post by:
hi all! in my custom HttpHandler HttpContext.Current.Session is not set - why? greetings, ralf
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
2
by: Ken Yee | last post by:
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...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
5
by: the4man | last post by:
Hi all! I have an app that show images that are stored in SQL Server. To show the images on screen, until now (with the "old" ASP), I use the following code: <img src="showimage.asp?id=20"...
5
by: zlf | last post by:
Hello, I try to use a custom HttpHandler to add something to session, then display the original page. public void ProcessRequest(HttpContext context) { context.Session = "test"; } But, a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.