我很努力去理解我做錯了什麼。我有一個接受數組的簡單接口。我無法處理超過150個物品 - 收回400個錯誤請求。我究竟做錯了什麼?任何人都能發現任何東西嗎我看着這個帖子,它似乎是答案,但它不適合我:WCF maxReceivedMessageSize not being read from config。WCF和.NET 3.5:接收大型數組
該服務託管在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>
顯然我的客戶端(WCFStorm)會圖片WS綁定,而不是httpBasic,我沒有任何定製。在我把所有的WS投標一起解除後,問題就解決了。 – Schultz9999