Reputation: 743
I would like to check if it's safe to throw a fault exception in AfterReceiveRequest. I am using a Custom Message Inspector to check for security headers. If the security check fails I throw the exception.
On the surface this appears to work and the fault is returned to the client.
Of course this exception means the target service method is never called and neither is IDispatchMessageInspector.BeforeSendReply.
Is it is safe to interrupt the WCF stack at this point?
Upvotes: 0
Views: 1128