1
My Routeconfig is configured this way:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{empresa}/{controller}/{action}/{id}",
defaults: new { empresa = "", controller = "Login", action = "Index", id = UrlParameter.Optional }
);
My access to controllers and actions is occurring normally, however I have calls to *.aspx files for my reports, these files are in a folder called "Reports", when I will perform the call to they are returning me this way to url: "http://localhost/mycompany/Reports/Customedio.aspx"
This way it does not find the respective file.
I need to access the url this way: "http://localhost/Reports/Customedio.aspx"
I found some examples like:
routes.Ignore("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"});
routes.IgnoreRoute("{*favicon}", new {favicon=@"(.*/)?favicon.ico(/.*)?"});
routes.IgnoreRoute("{Content}/{*pathInfo}");
routes.IgnoreRoute("myroute");
routes.IgnoreRoute("myroute/{*pathInfo}");
But I did not succeed with any of these examples.
What version of MVC are you using?
– Eduardo Sampaio
I’m using version MVC 5
– Cristiano Ávila Salomão