ASP.NET 文件上传失败

发布于 2024-08-01 18:54:49 字数 335 浏览 1 评论 0原文

尝试上传大文件 (20MB),我在 web.config 的 httpRuntime 条目中将 maxRequestLength 设置为足够高的级别(以及过期时间)。 事件日志停止报告帖子大小超出允许的限制,但我仍然在浏览器(IE 或 FF)中看到相同的行为:“加载页面时重置了与服务器的连接。” 我使用的是VS2008和内置的Web服务器,而不是IIS。 我已阅读有关此主题的问答,甚至在应用程序全局处理程序中检查异常 (IsMaxRequestExceededEException)。 关于此主题的另一个 StackOverflow 线程中引用了这一点。 有人有类似的事情吗,有什么想法吗?

谢谢, 鲍勃

Trying to upload a large file (20MB), I set the maxRequestLength to a high enough level (and the expiration time too) in the httpRuntime entry of web.config. The Event Log stopped reporting that the post size exceeds allowed limits, but I still get the same behavior in the browser (IE or FF): "The connection to the server was reset while the page was loading." I'm using VS2008 and the built-in web server, not IIS. I've read the Q&A on this topic and even put in the check for the exception (IsMaxRequestExceededEexception) in the application global handler. This was referenced in another StackOverflow thread about this topic. Anyone had anything similar, have any ideas?

Thanks,
Bob

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

回首观望 2024-08-08 18:54:49

我自己没有使用内置服务器遇到过这个问题,但是您也可以尝试在 web.config 文件中增加超时。

<httpRuntime executionTimeout="****" maxRequestLength="****" />

Not come accross this myself with the built in server, however you could try increasing the time out too in the web.config file.

<httpRuntime executionTimeout="****" maxRequestLength="****" />
老旧海报 2024-08-08 18:54:49

弄清楚了我的问题。 我将条目放入了错误的 web.config 文件中 - 我在同一个 VS 解决方案中有两个 Web 应用程序。 哦!

Figured out my problem. I put the entry into the wrong web.config file -- I have two web apps in the same VS solution. doh!

与君绝 2024-08-08 18:54:49

众所周知,HTTP 上传是不可靠的。 您应该研究一些利用 Flash 或 Silverlight 进行文件上传的其他选项。

Http uploads are notoriously unreliable. You should look into some other options that utilize Flash or Silverlight for file uploads.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文