[英]wcf rest service message logging
I need to add message logging filters for WCF REST service. 我需要为WCF REST服务添加消息日志记录 筛选器 。 Something like this:
像这样:
<diagnostics>
<messageLogging
logEntireMessage="true"
logMalformedMessages="false"
logMessagesAtServiceLevel="false"
logMessagesAtTransportLevel="true" >
<filters>
<add>any XPath</add>
</filters>
</messageLogging>
But no matter what I pass as XPath string - result is always the same: filtering is not applied. 但是无论我作为XPath字符串传递什么-结果总是相同的:不应用过滤。 Maybe I should add message version data in "filter" tag(
"http://schemas.microsoft.com/ws/2005/05/envelope/none"
and "http://schemas.microsoft.com/ws/2005/05/addressing/none"
in my case)? 也许我应该在“过滤器”标签(
"http://schemas.microsoft.com/ws/2005/05/envelope/none"
和"http://schemas.microsoft.com/ws/2005/05/addressing/none"
以我为例)?
I tried to do it, but unsuccessfully. 我尝试这样做,但未成功。 Maybe somebody can help?
也许有人可以帮忙吗? I can't find any useful information about filtering implementation in WCF REST services.
我找不到有关过滤WCF REST服务中的实现的任何有用信息。
How are you specifying the filter? 您如何指定过滤器? I'm not sure it's as simple as a string?
我不确定它像字符串一样简单吗?
<messageLogging logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="420">
<filters>
**<add nodeQuota="10" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
/soap:Envelope/soap:Header
</add>**
</filters>
</messageLogging>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.