NET Web application which calls a remote web service to get some information. When I deploy the web application to my local machine's IIS and run it is is able to access the remote web service fine. However if I deploy the web application to one of the live servers, I get System.Net.Sockets.SocketException:
No connection could be made because the target machine actively refused it 87.224.86.167:8080
The C# code I am using to make the request is pretty simple:
using (var client = new System.Net.WebClient())
{
string data = "{\"operation\":\"logon\", \"username\":\"" + hwCommUsername + "\", \"password\":\"" + hwCommPassword + "\"}";
byte[] response = client.UploadData(uri, "PUT", Encoding.UTF8.GetBytes(data));
string jsonResponse = Encoding.UTF8.GetString(response);
object decoded = EncoderHelper.JsonDecode(jsonResponse);
}
Any idea why?
Update: Example Uri I am accessing is : http://a23416.loco-pos.net which is a valid URI with the corrent credentials being passed in.