[英]binaryMessageEncoding cannot contain child element
This question has to do with my previous question where I get errors trying to save varbinary
to my database through a web service. 这个问题与我以前的问题有关,我在尝试通过Web服务将
varbinary
保存到数据库时遇到错误。
I increased the maxArrayLength
etc.. to send through to the server which works like this (in web.config
): 我增加了
maxArrayLength
等,以发送到服务器,其工作方式如下(在web.config
):
<binding name="OndernemersAward.Web.Service.EditAfbeeldingService.customBinding0">
<binaryMessageEncoding>
<readerQuotas maxDepth="32"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binaryMessageEncoding>
<httpTransport />
</binding>
But when I try to do this in my ServiceReferences.clientconfig
但是当我尝试在
ServiceReferences.clientconfig
执行此操作时
<binding name="CustomBinding_EditAfbeeldingService">
<binaryMessageEncoding>
<readerQuotas maxArrayLength="2147483647" maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647" maxDepth="2147483647"
maxBytesPerRead="2147483647" />
</binaryMessageEncoding>
<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"/>
</binding>
I get the following error: 我收到以下错误:
The element 'binaryMessageEncoding' cannot contain child element 'readerQuotas' because the parent element's content model is empty.
元素“ binaryMessageEncoding”不能包含子元素“ readerQuotas”,因为父元素的内容模型为空。
I'm just trying out things to try and fix the error I'm getting in my previous question, because I'm getting quite desperate. 我只是想尝试一些事情来解决我在上一个问题中遇到的错误,因为我已经非常绝望了。 :P
:P
I hope somebody can help me, Thanks 我希望有人可以帮助我,谢谢
There are no reader quotas in Silverlight (in other words, they're all already max'd out), so your config is equivalent to the one below: Silverlight中没有读取器配额(换句话说,它们已经全部用完了),因此您的配置等同于以下配置:
<binding name="CustomBinding_EditAfbeeldingService">
<binaryMessageEncoding/>
<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"/>
</binding>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.