J'ai la configuration de routesMaps pour mon site web. L'exécution et le débogage localement fonctionnent parfaitement. Je peux publier le site sur mon serveur (www) mais seule la page racine fonctionne (http://www.domain.com). Dès que je spécifie un contrôleur (http://www.domain.com/Project) il cesse de fonctionner ...ASP.NET MVC Pourquoi mon routage ne fonctionne-t-il pas après la publication?
Qu'est-ce que je fais mal?
Global.asax.vb
' 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
Quelle est la configuration de votre serveur de publication? –