Could any one facing the issue with c2dm server as i am unable to send the push messages to the devices. I was able to send the message couple of weeks back and just for the info my c2dm account is an older one.
Here is the Code I am using from past 2 yrs..
string authkey = getAndroidKey();
string collape_key = XXXXXXXXXXXXXX
string postData = "&collapse_key=" + collape_key + "®istration_id=" + deviceId + "&data.payload=" + HttpUtility.UrlEncode(payload);
byte[] byteArray = Encoding.ASCII.GetBytes(postData);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.Headers.Add("Authorization", "GoogleLogin auth=" + authkey);
request.ContentLength = byteArray.Length;
// Get the request stream.
Stream dataStream = request.GetRequestStream();
// Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length);
// Close the Stream object.
dataStream.Close();
// Get the response.
HttpWebResponse response = (HttpWebResponse)request.GetResponse(); --LINE 89 // There error is throwing here