title: In ASP.NET MVC, why do I get 404 errors after Publishing my website?
body: <p>I'm still new to ASP.NET MVC and I'm struggling a little with the routing.</p>
  
  <p>Using the ASP.NET development server (running directly from Visual Studio), my application can find its views without any problems. The standard ASP.NET URL is used - <code>http://localhost:1871/InterestingLink/Register</code></p>
  
  <p>However, when I publish my site to IIS and access it via <a href="http://localhost/" rel="nofollow noreferrer">http://localhost/</a><strong>MyFancyApplication</strong>/InterestingLink/Register, I get a 404 error.</p>
  
  <p>Any suggestions on what might be wrong?</p>
  
  <p>More info...</p>
  
  <p>This is what my global.asax file looks like (standard):</p>
  
  <pre><code>public class MvcApplication : System.Web.HttpApplication
      {
          public static void RegisterRoutes(RouteCollection routes)
          {
              routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
              routes.MapRoute(
                  "Default",                                              // Route name
                  "{controller}/{action}/{id}",                           // URL with parameters
                  new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
              );
  
          }
  
          protected void Application_Start()
          {
              RegisterRoutes(RouteTable.Routes);
          }
      }
  </code></pre>
  
  <p>My controller is also very simple:</p>
  
  <pre><code>public class InterestingLinkController : Controller
  {
      public ActionResult Register()
      {
          return View("Register");
      }
  }
  </code></pre>