You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Route("account/login", HttpVerbs.Get)]
public ActionResult Index()
{
return View();
}
When i run this Routes.axd shows 0 routes. The MapAttributeRoutes call is running but doesn't pick up any routes. The interesting thing is i can get routes to work in Web API project, but no dice with MVC.
EDIT:
Another weird thing is that i'm not able to pass any controller when mapping routes:
Will throw an exception stating that HomeController violates the constraint of type parameter 'T' or in another words doesn't implement IController which is bogus. It's really starting to sound like there are some compatibility issues with MVC 4.
The text was updated successfully, but these errors were encountered:
Trying to get routes to work with MVC 4.0.
Global.asax calls AttributeRouting to set things up:
Here is my controller action
When i run this Routes.axd shows 0 routes. The MapAttributeRoutes call is running but doesn't pick up any routes. The interesting thing is i can get routes to work in Web API project, but no dice with MVC.
EDIT:
Another weird thing is that i'm not able to pass any controller when mapping routes:
Will throw an exception stating that HomeController violates the constraint of type parameter 'T' or in another words doesn't implement IController which is bogus. It's really starting to sound like there are some compatibility issues with MVC 4.
The text was updated successfully, but these errors were encountered: