开发者

IParameterInspector Identify a REST Service

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);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜