Why do I get "target machine actively refused it 127.0.0.1:8888" after Fiddler uninstall

35,018 views
Skip to first unread message

ShaneR

unread,
Mar 20, 2015, 12:54:24 PM3/20/15
to httpf...@googlegroups.com
Hi 

A newbie to Fiddler so I am hoping someone can help me here.

I had installed Fiddler on my Win2012 server to trace some web service calls from an ASP.NET app

According to the docs to get this to work requires adding an entry in machine.config
http://blogs.telerik.com/fiddler/posts/13-01-08/capturing-traffic-from-.net-services-with-fiddler <http://blogs.telerik.com/fiddler/posts/13-01-08/capturing-traffic-from-.net-services-with-fiddler

I have now uninstalled Fiddler but the proxy redirect it has set up is still appears to be operating, and I get this error:

-------------------------------------------------------

No connection could be made because the target machine actively refused it 127.0.0.1:8888 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

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

-------------------------------------------------------

I have restored machine.config back to default but no luck. I have stopped & started the app pool. I have also rebooted the server

I noticed there were also some registry settings added by Fiddler for the Proxy. I have also removed those. 

I am at a loss as to what else is still intercepting the ASP.NET traffic. 
It only occurs on submission of a .NET form

Any pointers would be greatly appreciated!

EricLaw

unread,
Mar 20, 2015, 1:09:27 PM3/20/15
to httpf...@googlegroups.com
The literal answer to the question in the subject is: "your application is attempting to send its traffic to port 8888, but as nothing is listening there, an exception occurs."

You're almost certainly correct to assume that the reason your application is attempting to send its traffic to 8888 is because it thinks it's supposed to be using a proxy there.

The most likely explanation of why this is happening is when you say you've "restored machine.config back to default" you are incorrect. This can sometimes be tricky as there are typically at least 2 copies of machine.config on a given system and there can be four or more copies. (one for each bitness for each framework).

Your best bet would be to use a proper file search tool to search for *.config files containing the string 8888.

It's also possible that you've updated a web.config or app.config file to point at 127.0.0.1:8888 and this needs to be reverted. It's also possible that code was manually modified to point at 8888 although you'd probably remember doing that. :-)

Fiddler's registry modifications are undone every time you gracefully exit Fiddler (and ASP.NET typically ignores all registry settings for the proxy anyway).

(Stepping back a wee bit, it's not clear exactly what you mean when you say: "It only occurs on submission of a .NET form". What is the exact stack trace of the error?)

ShaneR

unread,
Mar 23, 2015, 4:29:22 AM3/23/15
to httpf...@googlegroups.com
Hi Eric,

Thanks for the reply. You were spot on, it's the simple things!
There was still an entry in a web.config file I had missed.

Thanks so much
Cheers

Dan Lu

unread,
Aug 17, 2016, 2:14:42 PM8/17/16
to Fiddler
What was the entry? I am having the same issue.

Eric Lawrence

unread,
Aug 17, 2016, 4:04:42 PM8/17/16
to Fiddler
If you modified your {web|machine|app}.config file to point at Fiddler, this will happen. Simply search for "127.0.0.1:8888" or look at the defaultProxy node.

Message has been deleted

ling...@gmail.com

unread,
Sep 21, 2020, 2:57:30 AM9/21/20
to Fiddler
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.

This exception message says you're trying to connect to the same host ( 127.0.0.1 ), while you're stating that your server is running on a different host. This 127.0.0.1 represents a 'loopback' . It allows the computer to communicate with itself via network protocol .

Dns.GetHostEntry(IPAddress.Loopback).HostName returns the host name of your machine. When you pass a host name to TcpClient , it will resolve it to one or more IP addresses using Dns.GetHostAddresses(hostName) . This includes the public and local IP addresses of your machine (e.g. 192.168.12.10), but not 127.0.0.1 (loopback address). So your client is trying to connect to any of the non-loopback addresses of your machine, while your server is listening only on the loopback address . So, no connection can be established. The solution to this problem is that connect to the same end point your server is listening on.
Reply all
Reply to author
Forward
0 new messages