کتابخانه WebApiThrottle
200, OK
https://github.com/stefanprodan/WebApiThrottle icon

ASP.NET Web API Throttling handler, OWIN middleware and filter are designed to control the rate of requests that clients can make to a Web API based on IP address, client API key and request route.

public static void Register( HttpConfiguration config )
{
    config.MessageHandlers.Add( new ThrottlingHandler
                                {
                                    Policy = new ThrottlePolicy( perSecond: 1,
                                                                    perMinute: 20,
                                                                    perHour: 200,
                                                                    perDay: 1500,
                                                                    perWeek: 3000 )
                                                {
                                                    IpThrottling = true
                                                },
                                    Repository = new CacheRepository()
                                } );
}
کتابخانه WebApiThrottle