title: Setting the default route for MVC site on IIS 8
body: <p>I've setup a site on our webserver using IIS8.  The URL is something link ABC.mycompany.com.  When I go to ABC.mycompany.com, I get a not found error:</p>
  
  <blockquote>
    <p>Server Error in '/' Application.</p>
    
    <p>The resource cannot be found.</p>
    
    <p>Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. </p>
    
    <p>Requested URL: /</p>
    
    <p>Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929</p>
  </blockquote>
  
  <p>If I go to ABC.mycompany.com/Home/InstrumentList, it shows the the correct page I want to start on.  How do I get it to start at this route?</p>
  
  <p>In Visual Studio 2013, I have Home/InstrumentList set as my start action and that works fine.  I've looked at several examples where they reference default and index pages, but my application doesn't have any of these.  Also, there are references to .aspx pages, but there are no .aspx pages in my app, just .cshtml Views and .cs Controllers.  I also have seen things about adding routes, but I'm unsure where to put them in global.asax.cs (in ApplicationStart? outside it? in a different method?  just alone?).  I also don't know what to change to work for mine (change index to InstrumentListing or leave it alone).  Nothing has worked for me so far.</p>
  
  <p>Here's one of my attempts using global.asax.cs where I tried to add a register route method:</p>
  
  <pre><code>namespace GPC
  {
      public class MvcApplication : System.Web.HttpApplication
      {
          protected void Application_Start()
          {
              AreaRegistration.RegisterAllAreas();
              FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
              RouteConfig.RegisterRoutes(RouteTable.Routes);
              WebApiConfig.Register(GlobalConfiguration.Configuration);
          }
  
          public static void RegisterRoutes(RouteCollection routes)
          {
              routes.MapRoute(
              "Default",
              "{controller}/{action}/{Filtre}",
              new { controller = "Home", action = "Index", Filtre = UrlParameter.Optional });
          }
      }
  }
  </code></pre>
  
  <p>Here are some of the sites I've used, but nothing has worked for me:</p>
  
  <p><a href="http://weblog.west-wind.com/posts/2013/Aug/15/IIS-Default-Documents-vs-ASPNET-MVC-Routes" rel="nofollow noreferrer">http://weblog.west-wind.com/posts/2013/Aug/15/IIS-Default-Documents-vs-ASPNET-MVC-Routes</a></p>
  
  <p><a href="https://stackoverflow.com/questions/29987078/cannot-set-default-route-for-mvc-project">cannot set Default route for MVC project</a></p>
  
  <p><a href="http://weblogs.asp.net/imranbaloch/editing-routes-in-mvc" rel="nofollow noreferrer">http://weblogs.asp.net/imranbaloch/editing-routes-in-mvc</a></p>
  
  <p>I'd appreciate if someone could show me how to get ABC.mycompany.com/Home/InstrumentList to show when the user goes to ABC.mycompany.com.</p>