Using a proxy with .NET 4.5 HttpClient

前端 未结 3 1506
无人及你
无人及你 2020-12-08 06:11

I\'m troubleshooting a bug with a service I call through .NET\'s HttpClient, trying to route the request through a local proxy (Fiddler), but my proxy settings seem to not b

3条回答
  •  不知归路
    2020-12-08 06:56

    Ah, The BaseAddress I was pointing to was http://localhost:8081. Turns out that despite setting BypassOnLocal to false, evidently localhost is still special enough that it bypasses the proxy.

    I added a domain binding in IIS, host file entry to point that domain to 127.0.0.1, used newly created domain, now it works.

提交回复
热议问题