Yoy 需要为 WCF webhttp 设置最大消息大小和缓冲区大小
<bindings>
<webHttpBinding>
<binding name="LargeWebBinding"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
maxBufferSize="2147483647">
<readerQuotas
maxArrayLength="2147483647"
maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647"
maxDepth="2147483647"
maxBytesPerRead="2147483647" />
</binding>
你可以尝试使用这个:
<behaviors>
<serviceBehaviors>
<behavior name="LargeWebBehavior">
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="2147483647" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceTimeouts transactionTimeout="00:10:00" />
<serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="100"
maxConcurrentInstances="100" />
</behavior>
</serviceBehaviors>
</behaviors>