【问题标题】:WCF, IIS6.0 (413) Request Entity Too LargeWCF、IIS6.0 (413) 请求实体太大
【发布时间】:2011-02-22 08:17:44
【问题描述】:

伙计们。我有恼人的问题。我有 WCF 服务(带有传输安全 Https 的基本HttpBinding)。该服务实现了由 2 种方法组成的合同。加载数据。获取数据。 GetData 工作正常!我的客户收到了 ~2Mb 大小的包,没有问题。一切正常。但是当我尝试通过

加载数据时
  bool LoadData(Stream data); - signature of method

我会得到的

 (413) Request Entity Too Large.

堆栈跟踪:

 Server stack trace: в 

ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)       

我试试这个http://blogs.msdn.com/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx。 但它不起作用! 我的服务器是 2003 的 IIS6.0。

请帮忙。

【问题讨论】:

    标签: wcf iis https


    【解决方案1】:

    百万美元点值得一提。 maxReceivedMessageSize 必须在节点上设置。这对我来说就像救世主一样。非常感谢 DreamTimeStudioZ。

    【讨论】:

      【解决方案2】:

      我认为您需要在 IIS 级别进行此更改 - 可能还需要上述 WCF 级别更改。

      MSDN blog: HTTP 413 request entity too large: can't upload large files using IIS6

      【讨论】:

      【解决方案3】:

      查看maxReceivedMessageSize 之类的绑定设置,readerQuotas 元素包含您可能也应该处理的设置。

      【讨论】:

      • 请注意,对于 WCF REST 端点,maxReceivedMessageSize 的设置必须在 节点上设置。
      猜你喜欢
      • 1970-01-01
      • 2016-09-08
      • 2020-02-05
      • 1970-01-01
      • 2016-11-14
      • 2014-12-30
      • 2014-12-23
      • 1970-01-01
      相关资源
      最近更新 更多