I have created my own silverlight API to get/set data from/to MailChimp.
It was working fine, but today I am getting an error. Example code is :
string MailChimpURL = "https://us2.api.mailchimp.com/1.3/?method=lists&apikey=my_api_key-us2";
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(MailChimpURL));
request.BeginGetResponse(new AsyncCallback(ReadCallback), request);
private void ReadCallback(IAsyncResult asynchronousResult)
{
HttpWebRequest request = (HttpWebRequest)asynchronousResult.AsyncState;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
using (StreamReader streamReader1 = new StreamReader(response.GetResponseStream()))
{
string resultString = streamReader1.ReadToEnd();
}
}
This works fine with http but gives error when using https.
The error which https is for yesterday. Months back it was working fine for both http and https. Now its only working for http.
Is this a problem in my code or this from MailChimp.
I don’t think you are showing us the true exception. The exception you are seeing when inspecting the
AsyncWaitHandleproperty you will always get when debugging because Siverlight does not support that property.You really need to place some error handling in your
ReadCallBackso you can report back to the UI in a friendly way anything that may have gone wrong.