Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9134221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:37:17+00:00 2026-06-17T08:37:17+00:00

NET Web application which calls a remote web service to get some information. When

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:37:18+00:00Added an answer on June 17, 2026 at 8:37 am

    Reference this StackoverFlow Posting No connection could be made because the target machine actively refused it

    “Actively refused it” means that the host sent a reset instead of an ack when you tried to connect. It is therefore not a problem in your code. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that port, this may be because it is not running at all or because it is listening on a different port.

    once you start the process hosting your service try netstat -anb (requires admin privileges) to verify that it is running and listening on the expected port.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight 3 application which calls a traditional .NET Web Service (asmx)
I'm working on a Asp.Net 3.5 Web Application which requires Async Web service calls.
I have a .net web application which has a reference to a web service.
I have an ASP.net web service that I'm using for a web application which
I'm writing an ASP.NET web application which will run on Windows Server 2008 (IIS7).
I have an ASP.NET MVC web application that makes REST style web service calls
I am developing a WPF application in .NET 4.0 which calls a WCF Service
I have a ASP.NET web application which has more than 100 pages. Each page
We are considering using Cassette in our asp.net web application which might be accessed
A simple question. I have an ASP.NET web application which contains several assemblies and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.