The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Timeout Error using C# wrapper for API V1

Highlighted
Occasional Participant

Timeout Error using C# wrapper for API V1

I have been using V1 of the API for several weeks now, and just today it seems that our app has started to hang during processing. It eventally throws a timeout error while awaiting a response when requesting contact details. The wrapper function is Utility.GetContactDetailsById(AuthenticationData, Id) which utilizes the following URI:

https://api.constantcontact.com/ws/customers/{username}/contacts/{contact-id}

 

The app works properly for the first few contacts before it starts to hang. Any info on what could be happening is appreciated. I am also using other calls such as

 

https://api.constantcontact.com/ws/customers/{username}/contacts?email={email-address}

 

These calls also result in timeouts.

 

Thanks

6 REPLIES 6
Highlighted
Employee

Re: Timeout Error using C# wrapper for API V1

Hi,

 

We have received a few reports of this behavior and are trying to determine the underlying cause.  From my testing, it appears that you can add as many new contacts as you want using the same script, but if you try to update more than 2 existing contacts within the same script, a call to us never gets made and the wrapper will report a timeout.

 

The C# wrapper appears to have a configuration issue that was triggered when we switched our API servers last week.  If you modify your script to update a maximum of 2 contacts before running the same script again, the issue should go away.

 

Please do let us know if you have any other insight on this.  

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Occasional Participant

Re: Timeout Error using C# wrapper for API V1

Thanks for the quick response. The app we are using to integrate with Constant Contact through the API is a scheduled .Net console app. Is there an object that I can reinstantiate that would make the API see the request as coming from a new script, such as the AuthenticationData object? I am not sure how the API knows that subsequent calls are coming from the same run of the console app.  

Highlighted
Occasional Participant

Re: Timeout Error using C# wrapper for API V1

Stopping and restarting the console app for every two updates is not optimal when there are instances where we have thousands of updates to make. Will this issue be fixed for the wrapper for version 1 of the API or will we need to update our integration to use version 2? Our client is expecting an ETA for resolving the issue, so any information would be appreciated. Alternatively, if you have more details about the configuration issue with the wrapper, perhaps I could address that myself using the wrapper source code.

 

Thanks

Highlighted
Employee

Re: Timeout Error using C# wrapper for API V1

Hi,

 

We don't yet know where the confguration issue lies, but it is almost certainly within the wrapper itself and not the underlying APIs, since NO calls get made to our servers when there are more than two updates to be made.

 

In your case, I would absolutely recommend switching to use our bulk API.  The individual update was never meant to be used for more than one contact being updated at a time.  Using the bulk upload API, new contacts will be added as well as existing contacts updated.

 

You can find more information on how to use the bulk upload method here.  The simplest way to implement it is to form a string, specifying what contact details are being specified (like first name, last name, and email address), supplying the email addresses and contact details to be added, and supplying the list(s) to add the contacts into at the end of the string.

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted

Re: Timeout Error using C# wrapper for API V1

We are also experiencing this exact issue. We cannot use the bulk API in this case because we are going through contacts individually and syncing each one with the contact in our database. Please give an update on this fix ASAP. Thank you.

Highlighted
Employee

Re: Timeout Error using C# wrapper for API V1

Hi everyone,

 

Thank you for your patience while we investigated why the timeouts were occurring.  It turns out that a method that was being used in the .NET wrapper wasn't closing streams.  The servers we just switched to didn't force close streams (like the old servers used to), so it exposed the issue with the wrapper which caused the timeouts.

 

Everyone can download the changes to the .NET wrapper that fixed the issue here.  

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured