How does IIS / ASP.NET handle dead connections? (no HTTP Keep-Alive in effect)

杀马特。学长 韩版系。学妹 提交于 2019-12-12 03:53:33

问题


Can IIS / ASP.NET make use of the TCP keepalive option to detect dead connections? Note that these connections do not have the HTTP Keep-Alive option in effect. These are connections, just abandoned by the clients, leaving IIS / ASP.NET threads hanging, waiting for data. Are there mechanisms in place by which IIS / ASP.NET handles such scenarios?


回答1:


ASP.NET only handles HTTP data sent over the connection, the period where there is no HTTP happening, but the TCP connection is kept alive means nothing to it.

IIS will not keep the TCP connection alive indefinitely, but periodically checks them for idleness.




回答2:


IIS has the option to open the connection as with TCP KeepAlives enabled, but all research suggests it uses the system setting for it. The system defaults to enabled with 2hr KeepAliveTimes.

http://support.microsoft.com/kb/120642 has references for registry values.



来源:https://stackoverflow.com/questions/3832072/how-does-iis-asp-net-handle-dead-connections-no-http-keep-alive-in-effect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!