服务器关闭了连接而没有发送任何数据. [英] The server closed the connection without sending any data.

查看:112
本文介绍了服务器关闭了连接而没有发送任何数据.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以在本地计算机上完美运行的Web应用程序.但是在服务器中托管时,对于某些页面(它会获取大量数据,因此要花一些时间才能显示出结果)的情况同样如此:-
错误324(net :: ERR_EMPTY_RESPONSE):服务器关闭了连接而没有发送任何数据.-在chrome
找不到服务器-在firefox中
和Internet Explorer无法显示网页-在IE中

我参加了很多其他论坛,有人建议将其放在web.config文件中.

I have a web application which runs perfectly in my local machine. But the same when hosted in server, for some pages (which gets large amounts of data, and so takes some time for the result to come out) gives me:-
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.-- in chrome
Server not found-- in firefox
and Internet Explorer cannot display the webpage-- in IE

I went through lot of other forums and some were suggesting to put this in web.config file

<httpRuntime executionTimeout="600" maxRequestLength="51200" />


如果有人遇到此错误,请提供我一个相同的解决方案,我将不胜感激.

在此先感谢


I would really appreciate if anyone can provide me a solution to the same, if they have come across this error.

Thanks in advance

推荐答案

它会获取大量数据,因此需要一些时间
听起来像是您正在获取大数据,而不是在传输/发送大数据.如果是这样,上面的配置设置将无济于事,因为它对于已发送的请求.例如,对于文件上传,您将需要增加请求的长度和超时.

由于您没有太多共享您正在做的事情,也没有共享您在调试时看到的内容,因此,我建议您尽可能地分块获取数据.假设您要获取一些要与网格绑定的数据,请在其中进行分页以提高性能.

如果您将数据库连接保持打开状态的时间过长,则也需要进行更改.在连接字符串中添加超时,并设置命令CommandTimeout属性.

有关您在问题中提到的配置条目的详细信息,请参阅: MSDN:httpRuntime元素(ASP.NET设置架构) ) [^ ]
which gets large amounts of data, and so takes some time
What it sounds like you are fetching large data and not transferring/sending large data. If so, above config setting would not help as it is for Requests sent. Example, for file upload, you would need to increase request length and timeout.

Since you have not shared much on what you are doing, nor have you shared what you see when you DEBUG, I will suggest you to fetch data in chunks if possible. Assuming you are getting some data to bind with grid, have pagination in it to improve performance here.

If you are keeping your database connection open for too long then it too needs a change. Add timeout in your connection string, and set the commands CommandTimeout property.

For details of the config entry you mentioned in your question, Refer: MSDN: httpRuntime Element (ASP.NET Settings Schema)[^]


这篇关于服务器关闭了连接而没有发送任何数据.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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