gpt4 book ai didi

c# - HTTP 错误 404.13 - 未找到

转载 作者:行者123 更新时间:2023-12-03 22:50:34 24 4
gpt4 key购买 nike

我在尝试调试我的应用程序时遇到了 seuinte 错误。

HTTP 错误 404.13 - 未找到

The request filtering module is configured to deny a request that exceeds the request content size .



查询 configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLength setting in applicationhost.config或 web.config 文件。

我的 web.config
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
<remove name="ApplicationInsightsWebTracking" />
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="31457280"/>
</requestFiltering>
</security> </system.webServer>

更多信息:

这和一个安全功能。 NOT Change a Less than 改变的范围被完全理解。快速 您可以将 IIS 服务器配置为拒绝内容大于指定 hum 值的请求。如果请求的内容大于设置的 * 大小,则返回 ESSE 错误。需要增加*内容大小,修改配置 configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLength .

最佳答案

您需要调整应用程序中的 maximumRequestLength 属性来处理如此大的文件。

重要的是要知道在设置这些值时 maxAllowedContentLength 以字节为单位,而 maximumRequestLength 以千字节为单位,因此您需要相应地调整它们:

<configuration>
<system.web>
<!-- This will handle requests up to 1024MB (1GB) -->
<httpRuntime maxRequestLength="1048576" timeout="3600" />
</system.web>
</configuration>

<!-- IIS Specific Targeting (noted by the system.webServer section) -->
<system.webServer>
<security>
<requestFiltering>
<!-- This will handle requests up to 1024MB (1GB) -->
<requestLimits maxAllowedContentLength="1048576000" />
</requestFiltering>
</security>
</system.webServer>

关于c# - HTTP 错误 404.13 - 未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36477130/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com