views:

47

answers:

1

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.

A: 

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?

Bradley Mountford
Firstly despite the application being ready, this is a request from my client, because they are changing their company bank account to a different bank and we might change the credit card payments system.Let me clear this up, what you say for the MVC feature is true, the url example.com/index.html works perfectly, but I need the url example.com to show index.html by default. Still the app should serve incoming urls that match the route exactly(just not respond to the "/" request). Should I remove the default values from the routes table for this to work?
gmakrygiannis