My RouteConfig is configured like this:
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, but I have calls to * .aspx files for my reports, these files are in a folder called " Reports ", when I'm going to call they are returning me this way to url: " link "
In this way it does not find the respective file.
I need to access the url like this: " link "
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.