简体   繁体   English

由于 asp.net mvc 2 中的文件大小而无法上传文件?

[英]cant upload file because of file size in asp.net mvc 2?

i am trying to upload a file with filesize 80M bytes.我正在尝试上传文件大小为 80M 字节的文件。 on my pc ( cassini server) i can upload the file.在我的电脑(卡西尼服务器)上,我可以上传文件。 On the webserver (iis 6) it throws an error?:在网络服务器(iis 6)上它会引发错误?:

404 - File or directory not found. 404 - 找不到文件或目录。 The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.您要查找的资源可能已被删除、名称已更改或暂时不可用。

this is what i have in my web.config:这就是我的 web.config 中的内容:

  <system.web><httpRuntime maxRequestLength="716800"/></system.web>

Try below configuration setting:尝试以下配置设置:

    <system.webServer>
        <security>
            <requestFiltering>
                <!-- 50 * 1024 * 1024 = 52428800 -->
                <requestLimits maxAllowedContentLength="52428800"/>
            </requestFiltering>
        </security>
    </system.webServer>     

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

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