超出最大请求长度. [英] Maximum request length exceeded.

查看:31
本文介绍了超出最大请求长度.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在我的网站上上传视频时,出现错误超出最大请求长度.

我该如何解决这个问题?

解决方案

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

中使用以下部分<预><代码><配置><system.web><httpRuntime maxRequestLength="1048576"/></system.web></配置>

对于 IIS7 及以上,还需要添加以下几行:

 <安全><请求过滤><requestLimits maxAllowedContentLength="1073741824"/></requestFiltering></安全></system.webServer>

注意:

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

这就是为什么这个配置示例中的值不同的原因.(两者都相当于 1 GB.)

I am getting the error Maximum request length exceeded when I am trying to upload a video in my site.

How do I fix this?

解决方案

If you are using IIS for hosting your application, then the default upload file size is 4MB. To increase it, please use this below section in your web.config -

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="1048576" />
    </system.web>
</configuration>

For IIS7 and above, you also need to add the lines below:

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

Note:

  • maxRequestLength is measured in kilobytes
  • maxAllowedContentLength is measured in bytes

which is why the values differ in this config example. (Both are equivalent to 1 GB.)

这篇关于超出最大请求长度.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆