Hi,
i have a webapp which works perfectly when debugged and tested locally. However when I publish the site to a productionserver the routing is messed up. This is because it runs as a sub-project on the productionserver.
Testing: http://localhost:xxx/ Production: http://remotehost/webapp/
How should I setup routing?
This is my current routing setup (mostly default). The server displays the default Controller action when I visit http://remotehost/webapp/. But when I hard-code the controller (http://remotehost/webapp/Project/ it doesn't work...
Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
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