8 Replies
If I remember correctly:
-
[Route("/")]
will only respond to requests with an exact path of /
.
- [Route("")]
will respond to requests made to the root path (e.g. /
or /Sample
).You said
[Route("/")]
twice?My bad
Fixed it
I tested it and
[Route("")]
doesn't seem to respond to /Sample
Just tried it and
[HttpGet("")]
didn't respond to /api/My/SomeAction. It still acted like [HttpGet("/")]
I know that when you use [HttpGet("/")]
on an action method then its template string doesn't get combined with the template string on the controllerI guess I don't remember correctly then sorry I couldn't be of more help
Someone else might come along shortly
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.