ASP.net HTTP 404 - 找不到文件的maxRequestLength例外,而不是 [英] ASP.net HTTP 404 - File not found instead of MaxRequestLength exception

查看:132
本文介绍了ASP.net HTTP 404 - 找不到文件的maxRequestLength例外,而不是的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网页文件上传控件。最大请求长度被设定为8MB(的maxRequestLength = 8192)。我也有,如果文件大于4MB更是引发错误的服务器验证。的原因,其在配置8MB是给了用户和杠杆也使应用程序可以测试

I have a file upload control on my webpage. The maximum request length is set to 8 MB (maxRequestLength = 8192). I also have server validation that throws an error if the file is more than 4MB. The reason that its 8MB in the config is the leverage that's given to the user and also so that the application can be tested.

如果我上传一个文件,该文件9MB,我得到抛出的异常最大请求长度超过了。,果然这是罚款和工作。但是,当我尝试上传的文件是1GB,它显示了我一个HTTP 404 - 找不到文件。有人可以解释为什么发生这种情况,我怎么能得到它扔我的maxRequestLength例外?

If I upload a file that's 9MB, I get thrown an exception "Maximum request length exceeded.", which is fine and working as expected. But when I try to upload a file that's 1GB, it shows me a HTTP 404 - File not found. Can someone please explain why this is happening and how can I get it to throw me a maxRequestLength exception?

我使用的是IIS6。

推荐答案

与1GB上传的问题是相关的更多的浏览器。我有麻烦堆与它尝试了很多解决方案,但真正要问这里有什么发生这种情况在现实世界中的机会为您的业务需求,也许应该记录为企业的已知问题的问题规则或非功能需求文档。

The problem with the 1GB uploads is more browser related. I have had heaps of trouble with it and tried a lot of solutions but really the question to ask here is what are the chances of this happening in the real world for your business needs and maybe it should be recorded as a known issue in the business rules or non functional requirements document.

这篇关于ASP.net HTTP 404 - 找不到文件的maxRequestLength例外,而不是的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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