我正在尝试访问AuthorazationHandler中的ModelState
。 GET
动作触发处理程序:
var httpContext = _httpContextAccessor.HttpContext;
httpContext.Request.EnableBuffering();
var routeData = httpContext.GetRouteData();
var actionContext = new ActionContext(httpContext, routeData, controllerActionDescriptor);
我看到routeData
包含正确的值,但是actionContext.ModelState
为空。为什么会这样?