I am working on a .net core app. I am trying to access route data in a middleware but it always returns null.
Here is the controller base route
[Route("User/{UserId}/Quote")]
public class QuoteController : ControllerBase
My objective is to try to get UserId inside middleware which I am using it for authentication somewhere else. My question is why the GetRouteData() call always return null?
UseMvc
then I don't think you will have access to the routing. – Waitabit