Webclient から Rest Service を呼び出そうとすると、次の例外がスローされます。この Rest サービスを別の WCF サービスから呼び出している場合にのみ、この例外が発生します。コンソール アプリケーションから Rest Service を呼び出すと、エラーはスローされませんでした。
ここに例外の詳細があります..
{"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)}
内部例外の詳細は次のとおりです。
{"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)}
この問題を解決するためのあらゆる種類のヘルプを歓迎します...