I need to run code similar to an HTTP module every time a request enters the WCF service. Some code examples can be authentication, throttling, logging, etc. What is the best way to execute a module every time a query is executed?
Edit to clarify
We will do a couple of things. First of all, we need to authenticate all requests. Each request will require the user to submit a set of credentials, such as an API key. We need to verify the correctness of the key before allowing the request to pass.
As for throttling, we need to limit the number of requests a particular user can make. Let them say 100 per hour or something like that.
Matthew kubicina
source share