I am coding in VB.NET and I am using Constant Contact API to add a contact to a particular list. When I got the above error I have looked into the forum for the potential solution and modified my VB code as per the suggestion of the tech manager of Constant Contact but still I am getting the same error. Can I get any help to sort this out? And the error is piointing to this particular line ...
Using response As HttpWebResponse = TryCast(request.GetResponse(), HttpWebResponse)
As I am getting very much problem of copy and pasting my code in the text box, I have attached that code as a text file.
Please help me out of this problem.
I did want to let you know that if your typical flow is to add one contact at a time, you would need to use our Contacts Collection to Create a Contact. You can find examples of how to do this in our C#.NET sample code located on our Code Samples page.
Regarding the sample code you posted, this did successfully create an add contact activity in my account which finished with no errors. The only thing I can think of that would cause an error for you and not for me would be if you do not have a list id of 9. If you'd like to give the username of your account, I can certainly confirm this.