c# - How to read an intranet site using HttpClient -


i trying access intranet site format https://foo @ work using httpclient. have below code:

var header = new authenticationheadervalue("basic",  convert.tobase64string (system.text.encoding.utf8.getbytes    (string.format("{0}:{1}", "username", "password"))));     client.defaultrequestheaders.authorization = header;  var result = await client.getstringasync(resourceuri); 

what need make work? have tried encrypting password using md5 no luck. program quietly exits after getstringasync call got no result.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -