Question

I would like to set a quota on how many times a given user can call a WCF service or a particular function in that service over a given time period (probably a rolling one hour time window). My service would require authentication, giving me enough information to actually track this type of data.

I'm looking to make this a configuration change that can be added to any existing WCF service. I'm fairly sure this functionality isn't available out of the box, but if it is please just point me in the right direction.

If it's not already available, what interfaces/base classes do I need to implement/inherit to create a class that I can add to my config to perform this type of quota tracking activity?

The information related to quota's on MSDN is all related to a single request: http://msdn.microsoft.com/en-us/library/ms731078.aspx.

Was it helpful?

Solution

To me it sounds like a special kind of authorization. The correct place to put this logic is in a service authorization manager. WCF built in quotas are per a single message and not what you are looking for. Also you have special logic like when to clear limit, how to priorize users with specific auth mechanism etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top