((413)请求实体在IIS 10 URL重写中太大

问题描述 投票:0回答:1

我将IIS 10服务器配置为基本URL重写反向代理,以对通过其他Web服务器定向的请求进行预身份验证,所有调用均通过SSL呈现客户端证书。我在大型POST中遇到(413)Request Entity Too Large错误的问题。

我尝试在applicationHost.config中设置它

<serverRuntime uploadReadAheadSize="2147483647" />

但是这没有效果。还有其他设置可以控制URL重写对大型POST的拒绝吗?

反向代理的web.config非常简单:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{CACHE_URL}" pattern="^(https?)://" />
                    </conditions>
                    <action type="Rewrite" url="{C:1}://my.internal.server:444/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
iis url-rewrite-module arr
1个回答
0
投票

总结评论。

尝试先更改<httpRuntime maxRequestLength="4194304" />。如果不起作用,请尝试接下来的<requestLimits maxAllowedContentLength="2147483647" />。如果仍然无法使用,请给我留言。

© www.soinside.com 2019 - 2024. All rights reserved.