I am developing a site on Azure, with mvc5. I use attribute routing, with routes and route prefix on controllers. I am calling with the action.link helper. I did not name my routes.
I did the following on my route.config:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapMvcAttributeRoutes(); routes.LowercaseUrls = true; routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } );
My controllers:
[OutputCache(Duration = 600, Location = System.Web.UI.OutputCacheLocation.Client)] [RoutePrefix("istanbul/kadikoy")] [Route("{action=index}")] public class KadikoyController : Controller { public ActionResult Index() { return View(); } [Route("kadikoy-tarihi")] public ActionResult KadikoyTarihi()
I have very low performance since the server response time, i.e. 9.6 s
If I comment on the attributes of the routing codes with default routing, I have a server response time of 2.1 s.
Thank you for your responses.
source share