[Solved] - No connection could be made because the target machine actively refused it 127.0.0.1:8888
The Solution is right here
Have you ever thought of having simple solution step by step?
Yes- this happened to me as well
However, I could only get bit and pieces of solutions after spending long hours in google search.
Today, in this blog let's see how to fix this error.
When exactly this error happens?
Any chance when you create a website or desktop application trying to reach remote web server or web API, your local computer prompts "No connection could be made because the target machine actively refused it 127.0.0.1:8888".
Local host always referred as 127.0.0.1
It is good to read the error message once again, to catch specific keyword to trace out error. The error message pointing to localhost(127.0.0.1:8888) followed by "Port Number" which is 88888.
The important point to notice here is the port number. Something to do with port number to get rid of this.
So, what to do now?
What might be the root cause for this error?
The most relevant term says this,
From your error message, the port number is not allowed in the server connection you attempt.
That means, when you try to make a connection to a remote server from your local computer along port number your request is considered invalid due to few settings are not configured correctly in your application or your authentication to the resources considered invalid.
What you should do?
This article explains two solutions right here - which is already working.
Let's see one by one!
Follow the simple and easy steps in first solution to clear local memory cache.
First Solution
Sometimes uncleared local computer memory cache would cause error or slowing down application performance.
Now, let's see the second solution how to handle in Internet Information Services (IIS)
Second Solution
What is that to make it work?
We are forcing Internet Information Services (IIS) worker process is windows process which is (w3wp.exe) to hit remote service by forcing NOT to read cached proxy through configuration file settings.
What is w3wp.exe?
An Internet Information Services worker process is a windows process (w3wp.exe) which runs web applications, and is responsible for handling requests sent to web server for a specific application pool.
Let's get to the point,
If your application development either web or desktop the backbone is configuration file. If web application look for the web.config file where as desktop application look for App.config file in your project.
Let's begin step by step;
Open your project solution
<system.net>
<defaultProxy>
<proxy usesystemdefault="False"/>
</defaultProxy>
</system.net>
<system.net>
<defaultProxy>
<proxy usesystemdefault="False"/>
</defaultProxy>
</system.net>
0 Comments