Unable to connect via API or ASMX

Hi there,

I've tried two different ways with the same result to add subscribers, and neither one will work.  I am able to use the asmx test page on http://api.createsend.com/api/api.asmx.  So, I know my key and listID are correct (I've x'd them out in the code).

In the first instance, I have a control with name and email textboxes, and a submit button.  here's the onSubmit code:

        string apiKey = "xxxxxxxxxx;
        string listID = "xxxxxxxxxxx";
        string emailAddress = txtEmail.Text;
        string name = txtName.Text;

        List<CustomField> customFields = new List<CustomField>();

        //adding a text custom field
        customFields.Add(new CustomField("Company", txtCompany.Text));
        customFields.Add(new CustomField("Country", txtCompany.Text));

        var result = CampaignMonitorAPIWrapper.Subscriber.Add(apiKey, listID, emailAddress, name);

        if (result.Code != 0)
            lblConfirmation.Text = "Error on adding subscriber : " + result.Code.ToString() + " - " + result.Message;
            lblConfirmation.Text = "Subscriber successfully added";

The error I recieve is this:

{"No connection could be made because the target machine actively refused it"}

It does seem odd to me that the target machine is listed there as localhost, and it would make sense to refuse the connection from localhost, but the config file in the apiwrapper solution correctly identifies the address.

In frustration, I tried to simply add the web service from visual studio and receive this error in the dialog:

Unable to connect to the remote server
No connection could be made because the target machine actively refused it
There was an error downloading 'http://api.createsend.com/api/api.asmx/$metadata'.
Unable to c (it was cut off in the window)

Can anyone offer any suggestions?  I need to get this supposedly simple job out the door.

thanks in advance,

Phil Phil, 7 years ago

Hi Chris,

Tough to be sure, but a bit of experimenting around here seems to indicate that if you have on port 8888 set up as a proxy server in your LAN settings in the windows internet options that's exactly what you'd see.

That's not to say that's exactly what's happening, but it looks like your the internet traffic in VS is trying to go through that port and getting rejected. My advice would be to start by looking at your proxy settings and go from there.

If that's not the issue, send us a support request and we can try and drill down a bit further.


200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free