How can I trace the HttpClient request using fiddler or any other tool?

后端 未结 6 1112
温柔的废话
温柔的废话 2020-12-09 01:20

I am using HttpClient for sending out request to one of the web api service that I don\'t have access to and I need to trace the actual request stream getting to the server

6条回答
  •  盖世英雄少女心
    2020-12-09 01:26

    IIS does not use the proxy setting in Internet Option because it runs under a different user identity (default is ApplicationPoolIdentity). @EricLaw has provided a good pointer regarding the problem of capturing traffic of IIS/ASP.NET.

    Instead of configuring IIS to use my login account, I edit web.config to force HTTPClient to use proxy, like following.

    
      
        
          
        
      
    
    

    Here is the detail of usage from MSDN.

提交回复
热议问题