http handlers and non existing folders

G

Guest

Hi,

I'm trying to implement an http handler that will redirect requests made for
specific folder which don't exists.

Currently my handler gets called if i request a non existing file but if i
try and request a folder, I get a 404 error.

Example:

If I request /testapp/nonexistingfolder/nonexistingfile.aspx
My handler gets called and all works fine.

However if I request /testapp/nonexistingfolder/ A 404 is returned.


Does anyone know how i could fix this?
 
T

Teemu Keiski

Hello,

in IIS that HTTP handler would need to be mapped to handle all requests (*
as symbol for extensions which will be handled). So in ASP.NET too. Do you
have it so?

Steps to do this are described in following KB article while it also covers
one problem situation that looks similar to yours.
http://support.microsoft.com/?kbid=834270
 
G

gerry

afaik , what Shaun is trying to do can't be done from within asp.net.
the asp.net pipeline is not invoked unless an asp.net resource is requested.
requests for 'directories' are 100% handled by iis , the request never gets
to asp.net
to handle this type if mapping would require an isapi filter in iis.

Gerry
 
T

Teemu Keiski

It can handle directories but would need .* extension mapping to ASPNET
ISAPI in IIS, that's what I was trying to explain. Then in ASP.NET you could
handle it with a custom HTTP handler.
 
G

gerry

Sorry I just reread your original reply.
What threw me off was where you said "that HTTP handler would need to be
mapped to handle all requests" which by itself is not true as this seems to
refer to the httphandler mappings in the web.config.
I missed the "in IIS" part.
The mapping is of all requests to the aspnet_isapi.dll, it really has
nothing to do with any particular http handler.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top