locked
All calls for post do not user the referred proxy and go as if no proxy exists RRS feed

  • Question

  • Hi All, we having some issues, i think is a tricky one

     

    Our context in a RaspeberryPie Running Windows 10 IOT CORE We need to use a proxy for internet access.

    --> c# code that sends a post to a webservice 

     HttpClient _httpClient = new HttpClient();
      HttpResponseMessage httpResponse = await _httpClient.PostAsync(_urlBase, new StringContent(postData, Encoding.UTF8, "application/json"));


    --> It works

    Our Problem 

     Even after setting proxy with "netsh winhttp set proxy ..."", Output bellow shows proxy configured in system. All calls for post do not user the referred proxy and go as if no proxy exists
     "
      Current WinHTTP proxy settings:
         Proxy Server(s) :  192.168.1.36:8080
         Bypass List     :  (none)
     "
    For us any solution (code, configuration, or even changing IOT Core to other flavor like IOT PRO) its ok as long as it solves the problem

    Thanks,

    Joao


    Monday, October 9, 2017 5:00 PM

Answers

  • Hello Joao,

    I run your C# code piece in UWP app on Raspberry Pi and set fiddler as the proxy following this tutorial. Then fiddler can capture the HTTP POST request.

    For more detailed information about your settings, the HTTP POST request is not routed to your proxy server(192.168.1.36:8080)?  How did you check this?

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, October 16, 2017 7:58 AM

All replies

  • Hello Joao,

    I run your C# code piece in UWP app on Raspberry Pi and set fiddler as the proxy following this tutorial. Then fiddler can capture the HTTP POST request.

    For more detailed information about your settings, the HTTP POST request is not routed to your proxy server(192.168.1.36:8080)?  How did you check this?

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, October 16, 2017 7:58 AM
  • Thank you, just point me to the right direction.

    Regards,

    Joao

    Monday, October 23, 2017 9:00 AM
  • Hi,

    the registry settings are on (as indicated) the win http are set. But the problem persists.

    Already tried restart and no luck. When running code in visualstudio (remote debug on rasp) the post runs always successfully (making the call without going by the proxy)

    Any help would be great. 

    Monday, October 23, 2017 12:53 PM
  • Hello Joao,

    Is there any update of your problem?

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 8, 2017 1:40 AM