I am creating a winodws phone and I copied some code from my web application, but the HttpWebRequest class is difference between on web and windows phone. There are no Preauthenticate and Media Type on the HttpWebRequest on VS2010 express for windows phone. I think I can change the Mediatype to be contentType. Is it right. How can I change the PreAuthenticate? Thanks in advance.
there is my code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(serviceUri);
//request.MediaType = "application/xml";
request.ContentType = "application/xml";
request.PreAuthenticate = true;
I could ignore request.PreAuthenticate and keep request.ContentType = “application/xml” then it works