Following exception is thrown when I tried to call the Rest Service from Webclient. I am Getting this exception only if I am calling this Rest service from another WCF service. If I call the Rest Service from the Console application, no error was thrown.
Here are the exception details..
{"Unable to connect to the remote server"}
[System.Net.WebException]: {"Unable to connect to the remote server"}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
InnerException: {"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 xxx.xxx.xx.xxx:443"}
Message: "Unable to connect to the remote server"
Source: "System"
StackTrace: " at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)\r\n at System.Net.WebClient.UploadString(Uri address, String method, String data)\r\n at System.Net.WebClient.UploadString(String address, String method, String data)\r\n at
TargetSite: {Byte[] UploadDataInternal(System.Uri, System.String, Byte[], System.Net.WebRequest ByRef)}
Here is the Inner Exception details:
{"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 xxx.xxx.xx.xxx:443"}
[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 xxx.xxx.xx.xxx:443"}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
InnerException: null
Message: "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 xxx.xxx.xx.xxx:443"
Source: "System"
StackTrace: " at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)\r\n at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)\r\n at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)"
TargetSite: {Void DoConnect(System.Net.EndPoint, System.Net.SocketAddress)}
Any sort of Help in resolving this issue is appreciated ...