I need to call a method in WCF before calling my operation

I need to validate a request across all operational contracts. The request base will have a user authentication token that needs to be verified each time.

I need to call a method in WCF (mainly to validate this request) before all my work contracts are called. Otherwise, I need to write code to validate the request in all methods of the operation contract.

Is there any option in WCF for this?

+3


source to share


1 answer


WCF offers several points of extensibility. You can check IDispatchMessageInspector.AfterReceiveRequest

, which allows you to check the incoming message before sending it to the operation.



+3


source







All Articles