简体   繁体   English

增加IIS7 / Win7 Pro上的最大上载文件大小

[英]Increasing Max Upload File Size on IIS7/Win7 Pro

I'm setting up a server for a client (something I don't typically do), and I'm running into issues with uploading larger files (11MB). 我正在为客户端设置服务器(我通常不会这样做),而且我遇到了上传大文件(11MB)的问题。 The server is running Windows 7 Professional with IIS added. 服务器正在运行添加了IIS的Windows 7 Professional。

In web.config I've tried setting 在web.config中我尝试过设置

<system.web>
    <httpRuntime maxRequestLength="65536" /> <!-- 64MB -->
</system.web>

... and that doesn't work. ......那不起作用。

I've set 我已经定了

<system.webSecurity>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="68157440" />
        </requestFiltering>
    </security>
</system.webSecurity>

... and that doesn't work either. ......那也不起作用。

What am I missing here? 我在这里错过了什么? As I've said, I don't typically set up servers, so I may be missing something obvious... no suggestion will be scoffed at! 正如我所说,我通常不会设置服务器,因此我可能会遗漏一些明显的东西......没有任何建议会被嘲笑!

Thanks in advance. 提前致谢。

Change system.webSecurity to system.webServer . 更改system.webSecuritysystem.webServer

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

If that doesn't work (due to permissions ramifications), set it using appcmd from an elevated command prompt: 如果这不起作用(由于权限分支),请使用提升的命令提示符下的appcmd进行设置:

appcmd set config "wms/wmsdev" -section:requestFiltering -requestLimits.maxAllowedContentLength:52428800 appcmd set config“wms / wmsdev”-section:requestFiltering -requestLimits.maxAllowedContentLength:52428800

More info here: http://bloggingabout.net/blogs/ramon/archive/2009/03/13/how-to-enable-large-file-uploads-in-iis7.aspx 更多信息: http//bloggingabout.net/blogs/ramon/archive/2009/03/13/how-to-enable-large-file-uploads-in-iis7.aspx

It turns out this was a problem with a component used on the front end. 事实证明这是前端使用的组件的问题。

It's worth noting (for anyone stumbling across this in the future), that the suggestions from both Jacob and Dan were required to make this work. 值得注意的是(对于将来遇到这种情况的任何人),雅各布和丹的建议都需要这项工作。

Thanks for your help anyway guys! 无论如何,谢谢你的帮助! Much appreciated! 非常感激!

如果它超时,我会将executionTimeout=”50000″添加到您的httpRuntime元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM