I have the following in my Web.config:
<httpHandlers>
. . .
<add verb="GET,HEAD" path="/" type="Vis.Web.BootHandler, Vis" />
</httpHandlers>
That HTTP handler returns a static HTML page, just to see if it works.
Now when I run my web application (which has no Default.aspx or the likes) I get the default directory listing instead. When I change the path to "/foo" it works perfectly fine.
I tried "" for the path, it yields the directory listing as well. Same having it as "/foo" and then adding a URL mapping to for "", "~", "~/" and "/"
How do I handle the web root / override the directory listing with a HTTP handler?
UPDATED: Regarding comment
This can’t be done in the development server as it requires a feature of IIS.
ORIGINAL:
You need to add a wildcard application mapping to the asp.net DLL so that all requestes (even for directories) are run through the .net runtime and therefore your HTTP Handler.
Check out http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx
for more info