MVC 5 Web Attribute Routing is not working
问题 I implemented the Attribute routing in my Application and after that when I started nothing was working as planned. Only the Json Results works rest is not working as expected. [RoutePrefix("ProductCategory")] public class CategoryController : Controller { [Route("CategoryMain")] // GET: /Category/ public ActionResult Index() { var cat = categoryService.GetCategories(); if (Request.IsAjaxRequest()) { return PartialView("Index", cat); } return View("Index", cat); } } Error Server Error in '/'