【发布时间】:2019-08-15 14:59:52
【问题描述】:
总是出现异常“已超出远程通道的传入消息的最大消息大小配额。有关更多详细信息,请参阅服务器日志”,在 .net c# wcf windows 应用程序开发中。
DataTable 中大约 72kb 大小的数据我能够成功地发送远程计算机托管 WCF 在 Windows 服务中。但在抛出异常“已超出远程通道的传入消息的最大消息大小配额。有关更多详细信息,请参阅服务器日志”。
已经在两端设置了数据大小管理。 客户端App.config:
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IProjectService"
maxBufferSize="2147483647" maxBufferPoolSize="524288"
maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="2147483647"/>
</binding>
</netTcpBinding>
</bindings>
远程服务器端App.config:
<netTcpBinding>
<binding name="NetTcpBinding_IProjectService" maxBufferSize="2097152"
maxBufferPoolSize="2097152"maxReceivedMessageSize="2097152">
<readerQuotas maxStringContentLength="2097152" />
</binding>
</netTcpBinding>
还尝试了相同的尺寸,即“2147483647”两端,但总是有相同的例外。
【问题讨论】:
-
"message size...exceeded" 从事件报告的角度来看,是关于 SO 的 WCF 问题的“NullReferenceException”。你先搜索了吗?
-
WCF - How to Increase Message Size Quota 的可能重复项。只需在适当的地方将 http 绑定更改为 Tcp
标签: wcf nettcpbinding