gpt4 book ai didi

iis - 413 - 请求实体太大 IIS 和 SSL

转载 作者:太空宇宙 更新时间:2023-11-03 12:42:26 25 4
gpt4 key购买 nike

当我尝试通过 SSL 向 Asp.net Web API 发送一个非常大的 POST 调用时,我收到了这个错误。
我知道重新谈判的现象。
我的 uploadReadAheadSize 设置为最大值。 (2147483647)

谁能告诉我一些我应该尝试的选择?

这是来自 Chrome 开发控制台的请求和响应:

enter image description here

我也尝试过以下命令但没有结果:

C:\Windows\System32\inetsrv\appcmd.exe set config "Web API"-section:system.webServer/ServerRuntime /enabled:"1024000" /commit:apphost

C:\Windows\System32\inetsrv\appcmd.exe set config "Web API"-section:system.webServer/ServerRuntime /uploadReadAheadSize:"1024000" /commit:apphost

最佳答案

重要提示:此答案适用于 HTTPS

  1. 进入配置目录

    C:/Windows/System32/inetsrv/config/

  2. 在编辑模式下打开 applicationHost.config 文件。

  3. 为您的应用程序添加此配置

    示例:配置为 1 MB 上传

<location path="SiteName" overrideMode="Allow">
<system.webServer>
......
<serverRuntime enabled="true" uploadReadAheadSize="1024000" />
.....
</system.webServer>
</location>
  1. 在 IIS 中重新启动您的站点

关于iis - 413 - 请求实体太大 IIS 和 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28994052/

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