Getting error while fetching information from windows live server

dorahedgehog

New Member
I am trying to authenticate user through windows live account with following code.\[code\]byte[] byteArray = Encoding.UTF8.GetBytes(postData); WebRequest request = WebRequest.Create("https://oauth.live.com/token"); request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = byteArray.Length; request.Method = "POST"; Stream resp = request.GetRequestStream(); Stream dataStream = request.GetRequestStream(); dataStream.Write(byteArray, 0, byteArray.Length); var response = request.GetResponse();\[/code\]But I am getting following error at last line.\[code\]The remote server returned an error: (400) Bad Request.\[/code\]what should I do for this?
 
Back
Top