I am having a great amount of difficulty deploying my MVC application to a machine running IIS 5.1 (XP Pro). I posted about it at the end of this thread: http://forums.asp.net/t/1193250.aspx but since that thread is marked as answered, it is unlikely to get viewed.
I wont repeat what I posted in the previous thread, but I do have a question that hopefully someone here can answer.
When I change the route rules in global.asax.cs to look like this:
RouteTable.Routes.Add(new Route
{
Url = "[controller].mvc/[action]/[id]",
Defaults = new { action = "Index", id = (string)null },
RouteHandler = typeof(MvcRouteHandler)
});
Are all of my URLs in the application suppose to contain the .mvc extension? To clarify, in IIS 5.1 with the new route rules (and all the other hackery needed for IIS 5.1) if I manually change the URL in the browser address bar to include the .mvc extension, such as product.mvc/search/1, it works. But none of my links of course contain the .mvc extension, and I do not believe that they should. Thus clicking a link in my application gets a "Page cannot be found" error.
Should I see the url get changed by IIS to include this extension? I currently do not. How can I tell if IIS is using the correct route rules?
taq
Perhaps a better way of asking this: Should all of my urls and redirects include the .mvc extension explicitly? Example: Response.Redirect("Product.mvc/Search/1")