When I have this route setup I can trigger any controllerName/actionName url because I do not need a start url/page.
I do not run a web api because I want to use razor for my views.
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapMvcAttributeRoutes();
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "*", action = "*", id = UrlParameter.Optional }
);
}
but when I start my project and run my site I see the base url in the browser: http://localhost:62127/
giving me a 404 error.
How can I configure my project to return a 403 error which is IIS typically giving me? When directory browsing is disabled?