Asked by:
CRM 2011 with IFD and plugins : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

Question
-
Hi,
Since I have enabled IFD on CRM 2011 (UR8), any treatment with plugins can fail (randomly) with the following error message:
<OrganizationServiceFault xmlns:i="http://www.w3.org/
2001/XMLSchema-instance " xmlns="http://schemas.microsoft.com/xrm/2011/ ">Contracts
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/ ">System.Collections.Generic
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema " i:type="d4p1:int">0</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.</Message>
<Timestamp>2012-09-28T08:33:47.8361076Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/ ">System.Collections.Generic
<KeyValuePairOfstringanyType>
<d3p1:key>OperationStatus</d3p1:key>
<d3p1:value xmlns:d5p1="http://www.w3.org/2001/XMLSchema " i:type="d5p1:int">0</d3p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.</Message>
<Timestamp>2012-09-28T08:33:47.8361076Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText>Does someone know what I should do?
SSL certificate is a valid wildcard certificate
My blog : http://mscrmtools.blogspot.com
Did you try the new CrmDiagTool for Microsoft Dynamics CRM 2011 ? If not, follow me
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator | Searchable Property Updater | Ribbon Browser | SiteMap Editor | JavaScript Web Resource Manager | Role updater- Edited by Tanguy T [MVP CRM]MVP, Moderator Friday, September 28, 2012 9:22 AM
Friday, September 28, 2012 9:18 AMModerator
All replies
-
Hi, is this a load balanced setup?
Kids don't try this at home!
Tuesday, October 2, 2012 9:17 AM -
Hi,
It's not a load balanced deployment
I guess it is due to time clock difference between my customer's site and the certificate provider but I need to check it
My blog : http://mscrmtools.blogspot.com
Did you try the new CrmDiagTool for Microsoft Dynamics CRM 2011 ? If not, follow me
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator | Searchable Property Updater | Ribbon Browser | SiteMap Editor | JavaScript Web Resource Manager | Role updaterTuesday, October 2, 2012 9:38 AMModerator -
Strange that it's failing randomly, since it's a wildcard cert do you have another cert with x.domain.com that might be intefering with your *.domain.com cert?
Kids don't try this at home!
Tuesday, October 2, 2012 9:59 AM -
-
Hi Tanguy
I managed to reproduce this.
Take a CRM 4 org with a CRM 4 plugin that creates/updates records
Import this org into a clean CRM 2011 environment with IFD
Trigger the plugin
*Crash*I tried messing around with LocalSdkHost and LocalSdkPort, managed to get a 401 authentication error but haven't been able to resolve the SSL/TLS error though. Have you had any luck?
stack trace below
>Crm Exception: Message: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel., ErrorCode: -2147220956, InnerException: System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.LegacySdkTypeProxyMetadataServiceWrapper.InternalInvoke(MethodInfo methodInfo, Object[] parameters)
at *SomeCRM4.Plugin*.Execute(IPluginExecutionContext context)
at Microsoft.Crm.Extensibility.V4PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)Kids don't try this at home!
Monday, October 8, 2012 4:21 AM -
I'm waiting for my customer feedback but it seems that all Active Directory domain was not synced with Internet time (5 minutes of difference). After having synced it, it seems the errors are gone...
My blog : http://mscrmtools.blogspot.com
Did you try the new CrmDiagTool for Microsoft Dynamics CRM 2011 ? If not, follow me
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator | Searchable Property Updater | Ribbon Browser | SiteMap Editor | JavaScript Web Resource Manager | Role updaterMonday, October 8, 2012 12:34 PMModerator