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.

Unable to connect to API.ConstantContact.com.

SOLVED
Go to solution
Highlighted
Occasional Visitor

Unable to connect to API.ConstantContact.com.

Using the CC C# example code : 

 

SSL / HTTPS errros

 

I am running win 7 and have applied all root CA update patches.

 

I have also installed the api certificate, the intermediate and the root as a trusted root athority.  My application still is not succeeding.  

 

Depending on the changes I have made to the code I am getting the following errors.

 

An operation failed because the following certificate has validation errors:\n\nSubject Name: CN=api.constantcontact.com, O="Constant Contact, Inc.", OU=Operations, L=Waltham, S=Massachusetts, C=US\nIssuer Name: CN=GlobalSign Organization Validation CA, O=GlobalSign, OU=Organization Validation CA\nThumbprint: 6BA4D74663011F2C11C8D803C66F7284587DB5E1\n\nErrors:\n\n The root of the certificate chain is not a trusted root authority..

 

OR 

AuthenticationException: The remote certificate is invalid according to the validation procedure.] System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) +2343936 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +123 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +123 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +123 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +123 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +123 System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +7243733 System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +217 System.Threading.ExecutionContext.runTryCode(Object userData) +376 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +98 System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +1134 System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +88 System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +20 System.Net.ConnectStream.WriteHeaders(Boolean async) +360 [WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.] System.Net.HttpWebRequest.GetResponse() +1126 ConstantContactUtility.Utility.GetResponseStream(Uri address, AuthenticationData authenticationData) +798 ConstantContactUtility.Utility.GetContactListCollection(AuthenticationData authenticationData, String currentChunkId, String& nextChunkId) +309 [ConstantException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.] ConstantContactUtility.Utility.GetContactListCollection(AuthenticationData authenticationData, String currentChunkId, String& nextChunkId) +511 ConstantContactUtility.Utility.GetUserContactListCollection(AuthenticationData authenticationData, String currentChunkId, String& nextChunkId) +124 ConstantContactUtility.Utility.GetUserContactListCollection(AuthenticationData authenticationData, String& nextChunkId) +73 EdData.SharePoint.Core.ConstantContactHelper.SubscribeUserToConstantContact(String pCcList, String pEmailAddress) +383 EdData.AudienceTracking.Registration.SubmitBtn_Click(Object sender, EventArgs e) +1278 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Unable to connect to API.ConstantContact.com.

Hi Ed,

 

Haven't seen this error before using our .Net example, however there is a good help thread on Microsofts Technet site that should provide you with the solution for this problem.  You can see the full solution here: http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/03dac22b-aa18-4a4f-b1e6-ac2...

 

It looks like the problem is that you need to have the full certificate path for both the server making the request as well as the Constant Contact webservices server.  Hope this helps.

 

Dave Berard
Senior Product Manager, Constant Contact

View solution in original post

2 REPLIES 2
Highlighted
Moderator

Re: Unable to connect to API.ConstantContact.com.

Hi Ed,

 

Haven't seen this error before using our .Net example, however there is a good help thread on Microsofts Technet site that should provide you with the solution for this problem.  You can see the full solution here: http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/03dac22b-aa18-4a4f-b1e6-ac2...

 

It looks like the problem is that you need to have the full certificate path for both the server making the request as well as the Constant Contact webservices server.  Hope this helps.

 

Dave Berard
Senior Product Manager, Constant Contact

View solution in original post

Highlighted
Occasional Visitor

Re: Unable to connect to API.ConstantContact.com.

Turns out I didnt need to trust my own server,  I exported all three levels of the certificate.  Root, Validation and the API cert.  I had to import all those into my Manage Trusts screen.  

 

This applicaiton we are working on is SharePoint 2010.  So this added configuration might only be needed for SP2010.  Thanks for your help.

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