超出最大请求长度。 [英] Maximum request length exceeded.
本文介绍了超出最大请求长度。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试在我的网站上传视频时,我收到错误超出最大请求长度。
I am getting the error Maximum request length exceeded when I am trying to upload a video in my site.
如何解决此问题?
推荐答案
如果您正在使用用于托管应用程序的IIS,然后是4MB的默认上载文件大小。要增加它,请在web.config中使用以下部分 -
If you are using IIS for hosting your application, then the default upload file size if 4MB. To increase it, please use this below section in your web.config -
<configuration>
<system.web>
<httpRuntime maxRequestLength="1048576" />
</system.web>
</configuration>
对于IIS7及以上版本,您还需要添加以下行:
For IIS7 and above, you also need to add the lines below:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
注意:
-
maxRequestLength
以千字节计算 -
maxAllowedContentLength
的衡量标准为字节
maxRequestLength
is measured in kilobytesmaxAllowedContentLength
is measured in bytes
这就是为什么这个配置示例中的值不同的原因。 (两者相当于1 GB)
which is why the values differ in this config example. (Both are equivalent to 1 GB)
这篇关于超出最大请求长度。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文