Jay*_*ido 9 asp.net iis asp.net-mvc upload
我正在为客户端设置服务器(我通常不会这样做),而且我遇到了上传大文件(11MB)的问题.服务器正在运行添加了IIS的Windows 7 Professional.
在web.config中我尝试过设置
<system.web>
<httpRuntime maxRequestLength="65536" /> <!-- 64MB -->
</system.web>
Run Code Online (Sandbox Code Playgroud)
......那不起作用.
我已经定了
<system.webSecurity>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="68157440" />
</requestFiltering>
</security>
</system.webSecurity>
Run Code Online (Sandbox Code Playgroud)
......那也不起作用.
我在这里错过了什么?正如我所说,我通常不会设置服务器,因此我可能会遗漏一些明显的东西......没有任何建议会被嘲笑!
提前致谢.
Dan*_*ner 13
更改system.webSecurity
到system.webServer
.
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="52428800"/>
</requestFiltering>
</security>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
如果这不起作用(由于权限分支),请使用提升的命令提示符下的appcmd进行设置:
appcmd set config"wms/wmsdev"-section:requestFiltering -requestLimits.maxAllowedContentLength:52428800
更多信息:http://bloggingabout.net/blogs/ramon/archive/2009/03/13/how-to-enable-large-file-uploads-in-iis7.aspx
归档时间: |
|
查看次数: |
19321 次 |
最近记录: |