Closed NanditaReshamwala closed 8 years ago
You can't do that directly, as an workaround you can split your month limit in 4 and rate limit per week. This is one of the limitation of WebApiThrottle that I have addressed in the ASP.NET Core port. When you'll migrate your solution to .NET Core you can use AspNetCoreRateLimit where you can specify custom time ranges for the rate limits.
hi Stefan ,
Thank you for your prompt response. Is there anyway I can write handler when limit is reached or any kind of anyhandler I can write ?. My idea is that I update the policy run time (perWeek in my case) when the limit is about to reach.
You can override the rate limit logic here ThrottlingHandler but updating the perWeek limit to solve the perMonth issue doesn't look good to me.
Thank you Stefan for guidelines.
hi Stefan,
I tried to override ThrottlingHandler method you suggested previously to override rate limit logic, but I think ThrottlingCore is not accessible outside of WebApiThrottle library.
Would you please help me how can I extend/override rate limit logic to support perMonth. We can not upgrade our project to.NET core at this stage.
Thank you.
hi Stefan,
My manager decided pricing perWeek, so I can use in built behaviour.
Thank you.
hi,
Thank you Stefan for your answer just before on other issue, I closed that issue. I have another question, we have to throttle PerMonth, Is it possible?