title: ASP.NET MVC Why doesn't my routing work after publish?
body: <p>i've got the following routeMaps setup for my website. Running and debugging locally works perfectly. I can publish the website to my server (www) but only the root page works (<a href="http://www.domain.com" rel="nofollow noreferrer">http://www.domain.com</a>). As soon as I specify a controller (<a href="http://www.domain.com/Project" rel="nofollow noreferrer">http://www.domain.com/Project</a>) it stops working...</p>
  
  <p>What am i doing wrong?</p>
  
  <p><strong>Global.asax.vb</strong></p>
  
  <pre><code>' Note: For instructions on enabling IIS6 or IIS7 classic mode, 
  ' visit http://go.microsoft.com/?LinkId=9394802
  
  Public Class MvcApplication
  Inherits System.Web.HttpApplication
  
  Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
  
      ' MapRoute takes the following parameters, in order:
      ' (1) Route name
      ' (2) URL with parameters
      ' (3) Parameter defaults
  
      routes.MapRoute("ProjectsByCategory", "Project/Category/{id}", _
                      New With {.controller = "Project", .action = "ListByCategory", .id = ""}, _
                      New With {.id = "^[0-9]+"})
  
  
      routes.MapRoute( _
          "Default", _
          "{controller}/{action}/{id}", _
          New With {.controller = "Project", .action = "Index", .id = ""} _
      )
  
  End Sub
  
  Sub Application_Start()
      Common.LoadEntitySpacesFactory()
      RegisterRoutes(RouteTable.Routes)
  End Sub
  End Class
  </code></pre>