Search code examples
asp.net-mvc-4iis-7.5asp.net-mvc-routing

ASP.NET MVC 4 route crashes on one specific keyword: Ekstranett


I'm using routing in my ASP.NET MVC 4 application and I'm experiencing a very strange problem. I am attempting to establish a route to an area named Ekstranett, but if I use Ekstranett as the first URL parameter I get an Internal Server Error. I can use any word except for Ekstranett and I find that very strange. This is my setup:

context.MapRoute(
            "Exception",
            "Ekstranett/Exception/{action}/{*handle}",
            new { controller = "Exception", action = "General", handle = UrlParameter.Optional },
            new[] { "MyProject.Areas.Ekstranett.Controllers" }
        );

        context.MapRoute(
            "Support",
            "Ekstranett/Support/{action}/{*handle}",
            new { controller = "Support", action = "Tickets", handle = UrlParameter.Optional },
            new[] { "MyProject.Areas.Ekstranett.Controllers" }
        );

        context.MapRoute(
            "Ekstranett_default",
            "Ekstranett/{controller}/{action}/{id}",
            new { controller = "Home", action = "Index", id = UrlParameter.Optional },
            new[] { "MyProject.Areas.Ekstranett.Controllers" }
        );

If I change Ekstranett to something like Ektranett, Testing, Foobar or anything else it works perfectly, but if I use Ekstranett it does not. Does anyone have any clue as to why I'm experiencing this behaviour?


Solution

  • The problem has been solved! Ages ago I made a virtual directory called ekstranett, I deleted it and everything works wonderfully now!