Windows Live Contacts

Z

Zhelyo Hristov

I am trying to get windows live contact from a smartphone 2003 SE device
Compact Framework 1.1 , the following code works when run on many other
https sites i tested, but is not working for the live contacts database. The
code gives an System.Net.WebExceptionStatus.ReceiveFailure when trying to
get the response from server.

Can someone please help fixing the issue.... btw the code works perfectly on
Windows XP


TicketAcquirer t = new TicketAcquirer();
string ticket = t.GetTicket();

HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("https://cumulus.services.live.com/<LiveID>/LiveContacts");
request.Method = "GET";
request.AllowWriteStreamBuffering = true; //required for bug
workaround
request.Headers.Add("Authorization", "WLID1.0 t=\"" + ticket +
"\"");
HttpWebResponse response =
(HttpWebResponse)request.GetResponse(); -< Exception
StreamReader reader = new
StreamReader(response.GetResponseStream());
string result = reader.ReadToEnd();
response.Close();
 
G

Guest

You could be receiving the exception due to timeout. Try setting the
rquest.Timeout property. I usually set to 30000 for windows mobile devices
(30 seconds).

I hope this helps.
regards,
Rick D.
Contractor
 
Z

Zhelyo Hristov

Thank you for your reply, but unfortunately the timeout fix didn't
help...tried playing with some other HtmlWebRequest settings but nothing....

Just before getting the ReceiveFailure exception I get
System.Net.Sockets.SocketException two times with error code 2.....

Can you please provide me some working code you used before

Thank you in advance....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top