I have a HomeController.cs with some actions and can access these via http://localhost/MyWebSite/Home/Test
I'd like to shorten the URL to http://localhost/MyWebSite/Test
Therefor I added following code to the RouteConfig.RegisterRoutes method
routes.MapRoute(
name: "ShortendUrl",
url: "{action}",
defaults: new { controller = "Home", action = "Test" }
);
When trying to access it via http://localhost/MyWebSite/Test I see
HTTP-Error 403.14 - Forbidden
Where is my mistake? Is the MapRoute wrong? or is it maybe an issue at the IIS configuration?
For reference I used this blog entry: http://weblogs.asp.net/gunnarpeipman/asp-net-mvc-defining-short-urls-for-root-level-pages