System.Net.Dns.GetHostAddresses

1 Answer 110 Views
FiddlerCore Windows
Administrator
Top achievements
Rank 1
Iron
Administrator asked on 07 Jun 2021, 03:22 PM

var ip = System.Net.Dns.GetHostAddresses("google.com")[0].ToString();

When the program is run through Fiddler. The above code returns the localhost IP.
I try setting breakpoints at BeforeRequest and BeforeResponse and AfterSessionComplete but no event is recorded?
May I ask is there a way to make it return the correct google.com IP?
Nick Iliev
Telerik team
commented on 08 Jun 2021, 10:25 AM

Hey Jasmines,


I can successfully get the IP using the above snippet via FiddlerScript (testing in OnBeforeRequest event) in FIddler Classic. I was also able to create a basic NET project, and while using FiddlerCore, I have once again seen the expected output. That said, It must be related to the specific program that you are running - is that a 3rd-party program that you are developing or an end product that you are trying to debug via Fiddler Classic? 

 

1 Answer, 1 is accepted

Sort by
0
Administrator
Top achievements
Rank 1
Iron
answered on 08 Jun 2021, 09:46 AM
The scenario occurs only when I use Proxifier to define a certain piece of software that will run through a proxy with FiddlerCore.

The situation does not occur when using RegisterAsSystemProxy
Tags
FiddlerCore Windows
Asked by
Administrator
Top achievements
Rank 1
Iron
Answers by
Administrator
Top achievements
Rank 1
Iron
Share this question
or