System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888

1 Answer 11944 Views
Fiddler Classic FiddlerCore
sumit
Top achievements
Rank 1
sumit asked on 20 Jul 2021, 03:02 PM | edited on 20 Jul 2021, 03:06 PM

.NET application show error message below when I close Fidler program on Windows Server (Production Environment)

System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888

If I open the Fidler program again, this error will be lost. I think this error occurred because the Filder does not roll back some settings after closing. So system still routes to 127.0.0.1:8888.

But after closing Fidler program I have checked the Internet option. It rollbacks properly (Use proxy server is unchecked).

Have other configuration that Fidler have changed? Or how to reset the proxy setting?

Currently, I work around by opening Filder program always.

Please help to solve this problem.

Lini
Telerik team
commented on 22 Jul 2021, 01:54 PM

We have seen similar reports in the past and in the end it turned out that the problem is related to improper proxy handling of some other piece of software. What happens is first you open Fiddler and it sets the proxy globally for all applications. Then when you start using the internet on some application, it checks the proxy settings, sees that there is a proxy configured ,reads the value (localhost:8888) and starts using it for requests. The problem happens when you stop Fiddler and the global proxy settings are restored to no proxy. Most applications will see this and continue to work as expected, but some apps will not update their connection settings and still try to connect to the proxy they read before even though they should read the global settings and remove the proxy value. 

Usually the problem can be resolved if you restart the faulting application. Note that this might be due to security reasons. One such example is some VPN software - once you start it, it reads the proxy settings once and will ignore proxy updates, so you must restart it each time proxy settings change.

1 Answer, 1 is accepted

Sort by
0
alexa
Top achievements
Rank 1
Iron
answered on 07 Dec 2021, 06:54 AM
This error is occurring because there is no server listening at the hostname and port you assigned. It literally means that the machine exists but that it has no services listening on the specified port . So, no connection can be established. Generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port.


Tags
Fiddler Classic FiddlerCore
Asked by
sumit
Top achievements
Rank 1
Answers by
alexa
Top achievements
Rank 1
Iron
Share this question
or