I have a WCF 4.0 REST service Application that I would like to intercept an incoming request and check a custom header. In my solution I am using the following default endpoint
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" />
</webHttpEndpoint>
</standardEndpoints>
I have tried creating a IDispatchMessageInspector and corresponding BehaviorExtensionElement and adding the appropriate behaviorExtension and endPointBehavior to my web.config. What else do I have to do to make the interceptor fire?
I am assuming that my complete lack of knowledge on the real workings of WCF is killing me here. My IParameterInspector were easy to implement and works perfectly. I hoped this would be as easy to implement.