I'm in the process of deploying an ASP.NET MVC app to IIS 6, but am running into an issue with the root path.
In Global.asax, I have the root path mapped:
routes.MapRoute("Root", "",
new { controller = "Dashboard", action = "Index", id = "" });
When I navigate to http://servername:70/test2/, the app displays the right page, but the stylesheet and JavaScript files are not loading. Looking at the source, the paths are showing like this:
<script src="test2/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css"
href="test2/Content/stylesheets/app.css" />
Which makes the browser look for
http://servername:70/test2/test2/Content/stylesheets/app.css
When I go directly to a controller (http://servername:70/test2/Dashboard.aspx), the paths are correct:
<link rel="stylesheet" type="text/css" href="Content/stylesheets/app.css" />
This is also occurring with any links generated with ActionLink. The stylesheet and script paths are being generated with Url.Content:
<link rel="stylesheet" type="text/css"
href="<%= Url.Content("~/Content/stylesheets/app.css") %>" />