问题描述
我有一个带有 HTTP 绑定的 WCF 服务.AppConif 文件 maxDepth="32".这适用于除 ONE 以外的所有机器.
我的问题是当 maxDepth="32" 时,为什么这在这台机器上不起作用.
当我设置 maxDepth="2147483647" 时,它适用于所有机器.
感谢您的帮助!
maxDepth 属性记录在此处:http://msdn.microsoft.com/en-us/library/ms731325.aspx,如您所见,它定义了 XML 结构中嵌套节点的最大数量.>
我猜有问题的机器的客户端生成具有深层结构的 SOAP 消息,这会导致异常.
您可以打开 WCF 消息跟踪并使用 WCF 跟踪查看器检查违规消息,如下所述:http://msdn.microsoft.com/en-us/library/ms733025.aspx 和 http://msdn.microsoft.com/en-us/library/ms732023.aspx
--larsw
I have a WCF service with HTTP Bindings. AppConif file maxDepth="32". This works on all machines except ONE.
My question is why doesn't this work on this machine when maxDepth="32".
When I set maxDepth="2147483647", it works on all machine.
Appreciate your help!
The maxDepth attribute is documented here: http://msdn.microsoft.com/en-us/library/ms731325.aspx, and as you can see, it defines the maximum number of nested nodes in the XML structure.
I guess a client of the machine in question produces SOAP messages with a deep structure, which causes the exception.
You can turn on WCF message tracing and use the WCF Trace Viewer to inspect the offending messages, as described here: http://msdn.microsoft.com/en-us/library/ms733025.aspx and http://msdn.microsoft.com/en-us/library/ms732023.aspx
--larsw
这篇关于与 WCF <readerQuotas> 相关的问题最大深度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!