asp.net-mvciis-7.5default-document

IIS 7.5 default documents and ASP.Net MVC 2 Routes


I am trying to deploy a website on Win Server 2008 R2 machine with IIS 7.5. The website is developed with asp net mvc2. My client asked me to deploy a simple .html document to be served until we decide to go live with the mvc app. I have created the website and published my site for testing and it works perfectly, but I cannot make my application ignore the index.html page. Until now I have tried the following:

  1. added IgnoreRoute("index.html") to the Global.asax.cs of my application
  2. set the default document in IIS to be "index.html"
  3. removed all other files from default documents.

but I still cannot get it right.


Solution

  • This is actually a feature of MVC. If there is an actual document that can be found at the location, that document will be used instead of the MVC ActionResult. I'll see if I can dig up the documentation.

    If your application is ready, why not just remove/rename the index.html?