ASP.NET网站上的错误。连接超时

时间:2022-08-10 03:21:52

I have suddenly got this error on a couple of my sites, and I'm not sure what the problem is. These sites have been up and runnnig for over 2 years now and this is the first time I'm seeing this error.

我突然在我的几个网站上出现了这个错误,我不确定是什么问题。这些网站已经运行了2年多,这是我第一次看到这个错误。

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond XX.XX.XXX.XXX:80"

“连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立的连接失败,因为连接的主机无法响应XX.XX.XXX.XXX:80”

The stack trace is as follows.

堆栈跟踪如下。

[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond XX.XX.XXX.XXX:80]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224

[WebException: Unable to connect to the remote server]
   System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +1867457
   System.Net.HttpWebRequest.GetRequestStream() +13
   Controls_IpConfigInner.stripConfig(String strClientIp) +136
   Controls_IpConfigInner.Page_Load(Object sender, EventArgs e) +86
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

The trace tells me it has got something to do with sockets, but there is no socket programming.

跟踪告诉我它与套接字有关,但没有套接字编程。

1 个解决方案

#1


1  

You aren't using a socket directly, but you are making a remote web request which uses a socket internally because that is how one does networking stuff on most platforms. Since there is a networking issue you see the socket exception at the end of the day.

您没有直接使用套接字,但是您正在制作一个内部使用套接字的远程Web请求,因为这是在大多数平台上进行网络连接的方式。由于存在网络问题,因此您可以在一天结束时看到套接字异常。

That error translates to "I could not open a connection to the remote server. Check the address, make sure it is listening on the appropriate port and make sure we aren't firewalled please."

该错误转换为“我无法打开与远程服务器的连接。请检查地址,确保它正在侦听相应的端口,并确保我们没有防火墙。”

#1


1  

You aren't using a socket directly, but you are making a remote web request which uses a socket internally because that is how one does networking stuff on most platforms. Since there is a networking issue you see the socket exception at the end of the day.

您没有直接使用套接字,但是您正在制作一个内部使用套接字的远程Web请求,因为这是在大多数平台上进行网络连接的方式。由于存在网络问题,因此您可以在一天结束时看到套接字异常。

That error translates to "I could not open a connection to the remote server. Check the address, make sure it is listening on the appropriate port and make sure we aren't firewalled please."

该错误转换为“我无法打开与远程服务器的连接。请检查地址,确保它正在侦听相应的端口,并确保我们没有防火墙。”