【发布时间】:2023-03-03 21:48:02
【问题描述】:
我们有一个服务器(IIS 6.0),托管了 2 个网站
一个是代理,另一个是 WCF RESTful API
现在的问题是,当代理网站访问内容长度超过 8000 的 API 时,例如前 9747 或 8398,它会在代理中给出 400 Bad request,而在 API 中会发生这种情况。
WCF Dispatcher Before Call 未被调用
WCF Dispatcher BeforeSendReply 被调用,内容长度为 0。
我们在绑定中有这个配置
<webHttpBinding >
<binding name="binding1" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" maxBufferSize="73400320"
maxBufferPoolSize="73400320"
maxReceivedMessageSize="73400320"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="73400320" maxStringContentLength="73400320"
maxArrayLength="73400320" maxBytesPerRead="73400320" maxNameTableCharCount="73400320" />
<security mode="None">
<transport clientCredentialType="None"/>
</security>
</binding>
</webHttpBinding>
可以做什么,我猜是内容长度问题
【问题讨论】: