“连接中断”在 asp.net 服务器上
当我尝试在实时服务器上运行一个非常长的操作(本地大约需要 2 分钟)时,我收到此错误:
Connection Interrupted
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again.
我将超时更改为 1 小时:
<httpRuntime executionTimeout="3600" />
...但它没有修复它。可能是什么原因造成的?我该如何解决?
谢谢
When I try to run a really long action (takes around 2 minutes locally) on my live server, I get this error:
Connection Interrupted
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again.
I changed the timeout to be 1 hour:
<httpRuntime executionTimeout="3600" />
... but it didn't fix it. What could be causing this and how could I fix it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查 IIS 中的超时。
另外,你和服务器之间有代理吗?
Check the timeout in IIS.
Also, are there any proxies between you and the server?
这很可能是浏览器,而不是服务器。例如,如果 IE 默认情况下 2 分钟内没有从服务器收到任何数据,则会超时< /a>.
底线:你最好弄清楚为什么你正在做一些长期运行的事情,但不这样做。
编辑
注意:该链接主要讨论 KeepAliveTimeout,但 ServerInfoTimeout 才是给您带来麻烦的原因。您可以按照链接中的说明修复您的盒子上的问题。然而,这不会修复您网站的消费者,因此您最好不要做需要很长时间的事情。
Most likely this is the browser, not the server. IE, for example, will timeout if it hasn't received any data from the server in 2 minutes by default.
Bottom line: you're better off figuring out why you're doing something that's very long-running and not doing it.
Edit
Note: the link talks mainly about the KeepAliveTimeout, but the ServerInfoTimeout is the one causing you trouble. You can fix things on your box by following the instructions in the link. This will not fix the consumers of your website, however, so you're better off not doing things that take a long time.