Search code examples
httpdebuggingcharles-proxy

Debugging HTTP calls with Charles


I have an ASP.NET app that I'm running on Mac OS X. This app has a web service. I call the web service, it then calls a third-party web service. I can successfully see in Charles that my web service is getting called. However, I cannot see the call to the third-party web service. Why would this happen? Does Charles ignore nested calls like this? I really need to debug the service call. However, I cannot see the Request that is being sent to the service in Charles.

How can I view the details of the call to the third-party service in Charles?


Solution

  • You need to configure your ASP.NET app to use Charles as its proxy.

    When you call your web service, your client (a browser?) uses Charles as its proxy, so you see the request. Your ASP.NET app then makes a new network request, but is not using Charles as its proxy so you don't see it.

    On Mac OS X, usually all applications use the system proxy settings, set in System Preferences > Network. Charles automatically sets those to use Charles if Mac OS X Proxy is ticked in the Proxy menu in Charles. I presume that is ticked for you, given that your client used Charles.

    So perhaps ASP.NET apps don't use the system proxy settings. In which case you need to check how you can set a proxy in your ASP.NET app. I'm sorry I'm not sure how to do that!