0

I am referenced a webservice and it works fine on my local machine. But when i promote my code to Test machine, i get below error:

Nancy.RequestExecutionException: Oh noes! ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: 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.x.xxx:80

Inner exception displays:

at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, 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)

Can anyone point me in right direction to check what maybe going wrong?

Thanks in advance.

Panagiotis Kanavos
  • 120,703
  • 13
  • 188
  • 236
Jay
  • 1,037
  • 5
  • 23
  • 41
  • 3
    You are either using the wrong target address or the web service isn't running. The important message is `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.x.xxx:80`. Can you telnet to that address at port 80, ie can you run `telnet xx.xx.x.xxx 80` ? If not, there is no-one listening on the server's side – Panagiotis Kanavos Oct 03 '16 at 11:46
  • thanks @PanagiotisKanavos for the pointer. When i Telnet i get nothing (rather get XML wit body as: The request verb is invalid) but how does it work on my local machine but not on Test server. – Jay Oct 03 '16 at 13:38
  • looks like we cant ping this IP from this particular server – Jay Oct 03 '16 at 14:00

0 Answers0