Problem trying to route a path that ends with a '.'

I am trying to direct the path as follows:

http://www.wikipediamaze.com/wiki/Washington,_D.C.

The routing structure does not select this as a valid route and gives me the error "Cannot find the resource." Does anyone know how I can get around this? It doesn't even get to my factory controller, so it doesn't even recognize it as a route or maybe it is looking for the actual file.

I have no problem with similar routes like:

http://www.wikipediamaze.com/wiki/United_States
http://www.wikipediamaze.com/wiki/Canadian_Bacon_(film)

but anytime I end the url with. he does not route it. If I do this, it works:

http://www.wikipediamaze.com/wiki/?topic=Washington,_D.C.

The route that I have installed is as follows:

routes.MapRoute(
    "wiki",
    "wiki/{topic}",
    new { controller = "game", action = "continue", topic = "" }
);
0
source share
1 answer

,

mypage.mvc or index.aspx

, ,

http://www.wikipediamaze.com/wiki/?topic=Washington,_D.C.

. , MVC , , .

0

Source: https://habr.com/ru/post/1709686/


All Articles