I have been developing a web service and a windows service, the web service I have deployed is in another server, and the windows service I have deployed works in my own server, so I use the windows service to call the web service. Everything was fine, but in a few days I have received the below message:
System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: No connection could be made
because the target machine actively refused it 127.0.0.1:57240
at
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress
socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4,Socket
s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace -
-- at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)