当文件较大且处理时间过长时,REST服务返回错误网关
我制作了一个REST服务,它接收一个ZIP文件,处理并检查一些内容,然后返回一个ID。这对于较小的ZIP文件很好,但是当发送较大的文件(目前测试为17MB)时,处理时间较长,服务返回“502坏网关-Web服务器在充当网关或代理服务器时收到无效响应” 我已尝试更改web配置中的所有变量:当文件较大且处理时间过长时,REST服务返回错误网关,rest,iis,web-config,bad-gateway,Rest,Iis,Web Config,Bad Gateway,我制作了一个REST服务,它接收一个ZIP文件,处理并检查一些内容,然后返回一个ID。这对于较小的ZIP文件很好,但是当发送较大的文件(目前测试为17MB)时,处理时间较长,服务返回“502坏网关-Web服务器在充当网关或代理服务器时收到无效响应” 我已尝试更改web配置中的所有变量: <binding name="webHttpTransportSecurity" maxReceivedMessageSize="163840000" maxBufferSize="1638
<binding name="webHttpTransportSecurity" maxReceivedMessageSize="163840000" maxBufferSize="163840000" closeTimeout="04:00:00" openTimeout="04:00:00" receiveTimeout="04:00:00" sendTimeout="04:00:00">
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
<httpRuntime maxRequestLength="2147483647" enable="true" requestLengthDiskThreshold="10240" useFullyQualifiedRedirectUrl="true" executionTimeout="1000" appRequestQueueLimit="4000000" />
<serviceBehaviors>
<behavior>
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
有没有人知道如何在更大的文件中实现这一点?在IIS或其他应用程序中,这一限制在哪里
更新:服务器上的“我的代码”继续在后台运行,并接收整个文件,即使服务调用方获得“坏网关”。因此这是一个“假”502。是否安装了防火墙?是否找到解决此问题的方法?