Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

HttpClientHandler with CookieException / Invalid cookie domain

$
0
0

Hi,

When I use HttpClient with HttpClientHandler to retrieve cookies, it works great if I send a request to http://www.google.com.

But if I send a request to https://login.microsoftonline.com/extSTS.srf, the exception below is thrown :

System.Net.WebException: Invalid cookie domain: login.microsoftonline.com ---> System.Net.CookieException: Invalid cookie domain: login.microsoftonline.com at System.Net.CookieContainer.AddCookie (System.Net.Cookie cookie) [0x00060] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/CookieContainer.cs:138

When I print HttpResponseMessage.Headers, I get the value below for cookies :

Set-Cookie: vv=1500&1374624501; expires=Wed, 07-Aug-2013 00:08:21 GMT;domain=login.microsoftonline.com;path=/;HTTPOnly= ;version=1

Any ideas to solve this issue ?

Thanks in advance


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>