I'm doing a message inspector in WCF:
public class LogMessageInspector :
IDispatchMessageInspector, IClientMessageInspector
which implements the method:
public object AfterReceiveRequest(ref Message request,
IClientChannel channel, InstanceContext instanceContext)
I can get the name of the invoked service with:
instanceContext.GetServiceInstance().GetType().Name
But how do I get the name of the invoked operation?
Operation.Current
is null in my case, it works if you retrieve the action through the Message object from the parameter as:System.ServiceModel.Channels.Message request
...request.Headers.Action
. – Aluminiferous