我有一个OData API,它工作正常,并返回预期的结果。当我添加 ThrottlingHandler()
源于 DeletgatingHandler
与 OData Route
它抛出
错误。
500 内部服务器错误
响应不包含任何数据。
OData Route.TrottlingHandler() : DelegateHandler
var builder = new ODataConventionModelBuilder();
builder.EntitySet<Session>(ControllerResources.Session);
var model = builder.GetEdmModel();
var pathHandler = new DefaultODataPathHandler();
var routingConventions = ODataRoutingConventions.CreateDefault();
var routeConstraint = new ODataPathRouteConstraint(pathHandler, model, Area, routingConventions);
var route = new ODataRoute(ControllerResources.ODataRoutePrefix, routeConstraint, new HttpRouteValueDictionary(), new HttpRouteValueDictionary(), new HttpRouteValueDictionary(), **new ThrottlingHandler()**);
routes.Add(Area, route);
ThrottlingHandler() : DelegateHandler.
returnValue = base.SendAsync(request, cancellationToken);
return returnValue;
@Sukhvinder Uppal
我想同步之后就可以解决了。对吧?