How to throttle requests in a Web Api?

后端 未结 7 525
深忆病人
深忆病人 2020-11-30 17:45

I\'m trying to implement request throttling via the following:

Best way to implement request throttling in ASP.NET MVC?

I\'ve pulled that code into my solut

7条回答
  •  囚心锁ツ
    2020-11-30 18:38

    Double check the using statements in your action filter. As you're using an API controller, ensure that you are referencing the ActionFilterAttribute in System.Web.Http.Filters and not the one in System.Web.Mvc.

    using System.Web.Http.Filters;
    

提交回复
热议问题