How can Intergate mailchipm api in wcf service.

Skip to first unread message

Rajnish Pandey

Feb 18, 2014, 5:02:32 AM2/18/14
I have tired to implement mail-chimp in wcf  service for subscribe user email when he register in my site by iPhone.
I have download sample code use in web application it is working fine. But when we tried to implement same code in wcf service it give me error message "The remote server returned an error: (500) Internal Server Error."

I have used following code for post in wcf service.

 var bytes = Encoding.UTF8.GetBytes(data)
 using (var client = new WebClient())
Type", "application/json");
       var response= client.UploadData("","POST", bytes);
         return Encoding.Default.GetString(response);

help me that how can I solve my issue.


Feb 18, 2014, 4:32:40 PM2/18/14
Hey Rajnish,

While I'm not an expert on taking a look at the line containing the post data it appears that there is an invalid URL being used.

You'll want to post directly to the API via the API url which you did have, https://<dc>

In this case if you're trying to use list subscribe on our us7 datacenter, you'd want to try something like this for your post URL: 

Ending that URL in .json will designate your return data type
Reply all
Reply to author
0 new messages