Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

291
Vistas
Fiddler not seeing API calls from C# HttpClient()

I have an ASP.NET MVC website that is calling a Web API web service.

The calls are working and return 200 OK - both calls to the web service on my local machine AND on a web server.

I have Fiddler running but it is not seeing these calls - only calls to the MVC website (which in turn calls the web service).

How can I see the actual web service calls?

This should be working right? Especially to the web-based web service.

I have stopped referencing http://localhost and am using MACHINENAME instead - as recommended in some SO posts. But this doesn't help.

I'm using HttpClient to call it:

using (var client = new HttpClient())
{
    var byteArray = Encoding.ASCII.GetBytes(username + ":" + password);
    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));

    client.BaseAddress = new Uri("http://MACHINENAME");
    client.DefaultRequestHeaders.Accept.Clear();
    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

    var response = await client.PutAsJsonAsync("api/path", custImp);
}

How can I view the web service calls in Fiddler?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

When you start Fiddler, it will change the default system proxy for the current Windows user so that Fiddler captures web requests made by this user.

However, the website is running inside IIS and is running under a different user. You need to make your website use Fiddler by explicitly specifying Fiddler as the web proxy in your MVC application's web.config file like this (use the port your Fiddler uses):

 <configuration> ... <system.net> <defaultProxy> <proxy proxyaddress="http://127.0.0.1:8888" /> </defaultProxy> </system.net> ... </configuration>

References:

  • Debugging Http or web service calls from ASP.NET with Fiddler
  • Capture .NET services traffic with Fiddler

As BornToCode mentions, it's also possible to change the application pool identity to your current user.

over 4 years ago · Santiago Trujillo Denunciar

0

Make sure to run Fiddler as administrator.

over 4 years ago · Santiago Trujillo Denunciar

0

I add .fiddler so that the requests are captured, example:

http://localhost.fiddler:59846

Reference:
https://docs.telerik.com/fiddler-everywhere/knowledge-base/capturing-localhost-traffic

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda