【发布时间】:2011-07-14 07:06:03
【问题描述】:
我很难理解我做错了什么。我有一个接受数组的简单接口。我无法处理超过 150 个项目 - 退回 400 个错误请求。我究竟做错了什么?任何人都可以发现任何东西吗?我浏览了这篇文章,它似乎是答案,但它对我不起作用:WCF maxReceivedMessageSize not being read from config。
该服务托管在 IIS7 中并使用 .NET 3.5。这是我的 web.config:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="MyService.basicHttpBinding" maxReceivedMessageSize="5000000" maxBufferSize="5000000">
<readerQuotas maxStringContentLength="5000000" maxArrayLength="5000000" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyService.Service1Behavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- Please set this to false when deploying -->
<serviceDebug includeExceptionDetailInFaults="True" httpHelpPageEnabled="True"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="MyService.Service1Behavior" name="MyService">
<endpoint address="ws" binding="wsHttpBinding" contract="IMyService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<endpoint binding="basicHttpBinding" bindingConfiguration="MyService.basicHttpBinding" contract="IMyService" />
</service>
</services>
</system.serviceModel>
【问题讨论】:
标签: c# .net wcf wcf-binding