我是WCF和Silverlight的新手,有一个使用Silverlight客户端和WCF服务器的应用程序,在我添加了一个以大对象为参数的方法之前,它一直工作得很好。该对象包含93个int、bool、string、enum类型的属性。当它阻塞时,WCF会给出如下错误消息:
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
没有其他有意义的信息。配置文件中的所有超时和缓冲区大小都已设置为最大值。
我试过用另一个包含较少属性的对象.我一个接一个地加起来,效果很好。
我发现,当有72个属性(带有枚举、bool、string、int)时,它可以工作,但是当我再添加一个属性时,它就不再工作了。
一周以来我一直在挣扎,谢谢你帮我.
发布于 2012-12-20 16:57:15
尝试将所有服务器端配额设置为最大,例如:
<bindings>
<basicHttpBinding>
<binding name="MyBasicHttpBinding"
maxReceivedMessageSize="2147483647"
>
<readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="MyWcfService">
<endpoint address="http://myservice..."
binding="basicHttpBinding" bindingConfiguration="MyBasicHttpBinding"
name="MyBasicHttpBinding" contract="IMyContract" />
</service>
</services> 发布于 2012-12-27 14:34:49
最后,我们找到了解决方案,对于那些有同样的问题:这是因为纽约的缺陷,MaxSessionSize(int,BinaryMessageEncodingBindingElement)的NetTcpBinding是最大的2048年,我们不能再增加,所以我们必须改变为更大的MaxSessionSize定制……
https://stackoverflow.com/questions/13976848
复制相似问题