English 中文(简体)
WCF Service - Max ReceivedMessageS Error
原标题:WCF Service - MaxReceivedMessageSize Error
  • 时间:2010-01-08 10:20:48
  •  标签:
  • wcf

我的WCF服务处设在Windows Service。 客户申请是一个网站项目,我添加服务参考资料。

现在,Windows服务配置文件对MaxReceivedMessageSize有适当的环境:

  <netTcpBinding>
    <binding name="netTcp" maxBufferPoolSize="50000000" maxReceivedMessageSize="50000000">
      <readerQuotas maxDepth="500" maxStringContentLength="50000000" maxArrayLength="50000000"
                    maxBytesPerRead="50000000" maxNameTableCharCount="50000000" />
      <security mode="None"></security>
    </binding>
  </netTcpBinding>

But when I add Service Reference to WebSite project, it updates the web.config with default values. And then I receive this error: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

我认为,更新网站编集,说明服务集团的情况,将会消除这一错误。

但是,我想知道,在我增加服务参考时,我是否需要逐个人工改变这些环境?

最佳回答

很不幸的是,在增加服务参考资料时,服务器中的环境将不转给客户。 你们不得不人工确定这些内容。

你可以做的是使用“最新服务参考”菜单,而不是总是建立新的服务参考。 这可以保护你们的环境(我肯定——我永远不使用自己)。

问题回答

暂无回答




相关问题
WCF DataMember Serializing questions

Ok, so I was part way through the long winded process of creating DTOs for sending my model over the wire and I don t feel like I m going down the right route. My issue is that most of the entities ...

Access WCF service on same server

I have a .NET website with a WCF service. How do I access the current operations context of my service? One possible work around is to just make a call to the service within the app...but that seems ...

WCF binding error

So I got into work early today and got the latest from source control. When I try to launch our ASP.NET application, I get this exception: "The binding at system.serviceModel/bindings/wsHttpBinding ...

The service operation requires a transaction to be flowed

I am facing strange issue with our WCF service. The same code was working fine until recently we added more OperationContracts(Web Methods). We have common 3 tier architecture. DAL (WCF) BLL Web ...

热门标签