tags:

views:

1361

answers:

2

I have an ASP.NET website deployed on IIS 6. I have several folders in my app containing handlers like log.ashx, default.ashx and so on.

I have default document configured in IIS, so that I can type www.mydomain.com/tools in the browser, and I will get the /tools/default.ashx.

IIS gives me 404 all the time, which is my problem. I also have the aspnet_isapi.dll configured as a wildcard handler.

Does anyone know how to fix this?

A: 

Where is the default specified? In "tools"?

Do you get any difference between ".../tools" and ".../tools/" ?

Marc Gravell
No difference. I tried to remove the ASP.NET Isapi wildcard handler, and it still returns 404.I ended up deleting the entire website in IIS, and re-creating it which solved the problem.
MartinHN
So just IIS with a grudge, then ;-p
Marc Gravell
A: 

Setting the default document in IIS just tells IIS to look for a document with that name in the requested folder, so if /tools/default.ashx doesn't exist on the server, then you will indeed get a 404.

You need to declare handlers in the web.config - and this article http://dotnetperls.com/Content/ASHX-Handler.aspx runs you through how you could set something similar up using the urlMappings part of the web.config.

Zhaph - Ben Duguid
Do you really think that I post a question here without knowing that default.ashx actually exists in the folder? :)
MartinHN
To be honest, no, I did misread that part of your question. However, I created a simple site, added default.ashx to the list of documents in IIS, and created a folder called tools with a "GeneralHandler" called default.ashx in it, and that worked as expected, calling /tools displayed handler :(
Zhaph - Ben Duguid