I have run into a strange issue where any URL containing “PRN” will return a 404.
If I have 2 methods:
public string Test(string x)
{
return "hello";
}
public string PRN(string x)
{
return "worked";
}
I can call test by navigating to:
Controller/Test
It will always return “hello.” However, if I try to call:
Controller/Test/PRN, I get a 404
If I attempt to call Controller/PRN/Anything, I get a 404
In multiple MVC3 applications, I have found that any URL containing “PRN” will return a 404 error. Does anyone have any ideas?
EDIT:
This is my route configuration:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
Thanks.
You should have a read a this : http://bitquabit.com/post/zombie-operating-systems-and-aspnet-mvc/
Which points to : ASP.NET MVC Routing vs. Reserved Filenames in Windows