locked
Make request under windows domain

    Question

  • Hi,

    I am developing an application for windows 8 and  i make request in a  corporate apn (I can only access the server through this apn) 

    These requests are incorrect when the pc is under a windows domain, whereas when they are not is any domain, are performed correctly. 

    Can anyone help me? 

    Thanks


    Tuesday, March 25, 2014 4:04 PM

Answers

  • which http client are you using? the old System.Net or the new one in the Windows namespce?

    in the old one you have to set usedefault credentials.

    HttpClient client = new HttpClient(new HttpClientHandler { UseDefaultCredentials = true });


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Tuesday, March 25, 2014 4:51 PM

All replies

  • which http client are you using? the old System.Net or the new one in the Windows namespce?

    in the old one you have to set usedefault credentials.

    HttpClient client = new HttpClient(new HttpClientHandler { UseDefaultCredentials = true });


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Tuesday, March 25, 2014 4:51 PM
  • Sorry for the delay, and the first, thanks for your answer

    HttpClient client = new HttpClient(new HttpClientHandler { UseDefaultCredentials = true });

    still gives me an error : "An error occurred while sending the request". 

    Thanks!

    Monday, April 07, 2014 8:24 AM
  • dod you tried to add fiddler in between?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, April 07, 2014 9:17 AM
  • With a fiddler ON, everything goes perfect, when i close fiddler, Error during the request. Is HttpClient behaving rarely? 

    Thanks

    Friday, April 11, 2014 10:15 AM
  • Hi, i´ve resolved the issue: Capabilities

    http://stackoverflow.com/questions/12313122/unable-to-connect-to-the-remote-server-but-works-when-fiddler-is-running-metro-a

    Thanks!


    Monday, April 14, 2014 11:19 AM