views:

500

answers:

1

I have a web site that serves only one page from the root. The page (call it stuff.htm) is generated by a custom handler, and doesn't physically live on disk.

I'd like stuff.htm to be the default doc for the site, but the standard configuration method of making it the default doc fails since the regular ASP.Net DirectoryListingModule is trying to do a Server.Execute of the file. (At least, that's what I can infer is happening.)

I know I can write code through a default.aspx that does what I need, but I want to avoid writing code for this. Any known configuration tricks to supersede the default handler behavior without having to override the default handling behavior?

+1  A: 

Is ASP.NET set to handle the file extension you are trying to serve? If so I would expect it to work correctly; otherwise here are some "cheap and dirty" answers.

The "cheap and dirty" answer is to create an empty file named stuff.htm at the root, set it as the default page, and then ensure that ASP.NET is mapped to handle the .htm file extension (or whatever you are actually using).

The second "cheap and dirty" answer is to create a default.htm page and then set it up as a redirect to stuff.htm.

jellomonkey
Thanks for the suggestions, but I'm looking for the configuration approach instead of using pages as the routing solution.
jro