Error while doing HTTP POST through WCF Service

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Through a WCF method (hosted in local IIS) we are posting data to a external website (HTTPS) using WebRequest.
However when a client make a call to the WCF service, while connecting to the externalwebsite through WebRequest we are getting the below error message:
Unable to connect to the remote server
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it xxx.xxx.xxx.xxx:443<br/>
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)<br/>
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)<br/>
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

From the same dev machine if I create a console app to post data to the same external url it works perfectly fine and returns a response message successfully.
Can anyone suggest why the post fails when it is called through the WCF service?


View the full article
 
Back
Top