【发布时间】:2015-11-12 20:42:24
【问题描述】:
这似乎是一个非常常见的问题 - 我已经阅读了 SO 和其他网站上的大量 cmets。问题是,即使在修复了我的配置后,我在发送 ~50K 有效负载时仍然收到 413 错误。
这是服务配置的相关部分...
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
<services>
<service name="Sync.Inbound" behaviorConfiguration="serviceWebConfiguration">
<endpoint address="" binding="webHttpBinding" bindingName="defaultRest" behaviorConfiguration="web" contract="Sync.IInbound" />
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="defaultRest" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" transferMode="Streamed">
<readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
<behavior name="json">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="serviceWebConfiguration">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
我正在通过 httpWebRequest 从一个简单的 C# 控制台应用程序调用它来进行测试...有人看到我在服务配置中缺少的任何内容吗?
【问题讨论】:
标签: c# .net web-services wcf rest