Default Document and HttpHandler serve a specific page

I am in the following situation.

I have IIS 7.5 with an ASP.NET application. The application must run with IIS Classic Mode.

I have one HttpHandler that serves all the Request:

  <httpHandlers>
  <add verb="*" path="*.aspx" type=".....HandlerFactory..." />
</httpHandlers>

The problem is that i can't establish a Default Document to an non phyisical file. I want that the Default Page be : Home.aspx (which is a non phyisical file).

So when I go: www.mysite.com I get an error:

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.

I do not want to make a REDIRECT.

Is there any way to accomplish this without having to create a index.html to redirect to Home.aspx?

Thanks in advance!

Answers


One option would be to rewrite requests to / to /home.aspx.

The old IIS5/6 trick here is to put a blank default document in the folder -- this will get past the "does the file exist" but your http handler will kick in and take over so said blank document won't be involved.

I'll note this is why ASP.NET MVC ships with a Default.aspx in the root.


If you create a blank Home.aspx file and set it as the default page then IIS will pick this up as your default document, but it will still be processed by your handler.


Need Your Help

Overwrite default Content-Type when using saveparameters in jqGrid

jquery jqgrid

I am using the saveRow function in inline_editing in jqGrid, the default Content-Type is "application/x-www-form-urlencoded; charset=UTF-8" with the following

Populating dropdown list from comma seperated values in textbox ASP.NET

asp.net drop-down-menu textbox datasource populate

I want to populate a dropdownlist with comma seperated values from a textbox. I have below code:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.