I am planning t开发者_StackOverflow社区o add a WCF Behavior to all the web services(SOAP + REST) in my solution. I plan to use the same IParameterInspector implementation. Is there a way in the implementation I can identify if the request call is for a WCF service or REST Service.
I found the solution as below
//To Identify if it is a REST Service. //Action will be null in case of REST Service
bool isRestService = string.IsNullOrEmpty(OperationContext.Current.IncomingMessageHeaders.Action);
精彩评论