Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Period (. and ..) in URL path ASP.NET Core

$
0
0
Hello,

public class C1

{

[Route("a/{b}/c/{d}")]

public IActionResult API1(string b, string d)

{}

[Route("a/{b}/c")]

public IActionResult API2(string b, xyz d)
{}

}

public class C2

{

[Route("a/{b}")]

public IActionResult API3(string b, string d)

{}

}

When API called with "a/asd/c/." it selects C1.API2() and not C1.API1().
When API called with "a/asd/c/.." it selects C2.API3() and not C1.API1().

How do I handle . and .. in URL path?

Expected Result - C1.API1() should be called when using . and ..

Environment - ASP.NET Core 2.1


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>