gpt4 book ai didi

asp.net - 超出最大请求长度。

转载 作者:行者123 更新时间:2023-12-03 03:51:47 25 4
gpt4 key购买 nike

当我尝试在网站中上传视频时,收到错误超过最大请求长度

如何解决这个问题?

最佳答案

如果您使用 IIS 托管应用程序,则默认上传文件大小为 4MB。要增加它,请在您的 web.config -

中使用以下部分
<configuration>
<system.web>
<httpRuntime maxRequestLength="1048576" />
</system.web>
</configuration>

对于 IIS7 及更高版本,您还需要添加以下行:

 <system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>

注意:

  • maxRequestLength千字节为单位
  • maxAllowedContentLength字节为单位测量

这就是此配置示例中的值不同的原因。 (两者都相当于 1 GB。)

关于asp.net - 超出最大请求长度。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3853767/

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