2

When I try to save a component with an ECL image linked as component link I'm having an error related to "The given key is not present in Dictionary". I changed the log of ExternalContentLibrary to Debug and I can see:

    2015-11-05T20:23:41 TcmServiceHost  8   GetStubSchemaId(publicationId='26')
2015-11-05T20:23:41 TcmServiceHost  8   TryGetStubSchemaId(publicationId='26')
2015-11-05T20:23:41 TcmServiceHost  8   GetStubFolderId(publicationUri='tcm:0-26-1')
2015-11-05T20:23:41 TcmServiceHost  8   GetStubFolderId:stubConfig.Id='tcm:24-29285-2'
2015-11-05T20:23:41 TcmServiceHost  8   GetStubSchemaId(publicationId='26')
2015-11-05T20:23:41 TcmServiceHost  8   TryGetStubSchemaId(publicationId='26')
2015-11-05T20:23:41 TcmServiceHost  8   GetStubFolderId(publicationUri='tcm:0-26-1')
2015-11-05T20:23:41 TcmServiceHost  8   GetStubFolderId:stubConfig.Id='tcm:24-29285-2'
2015-11-05T20:23:41 TcmServiceHost  8   GetStubSchemaId(publicationId='26')
2015-11-05T20:23:41 TcmServiceHost  8   TryGetStubSchemaId(publicationId='26')
2015-11-05T20:23:41 TcmServiceHost  8   GetStubFolderId(publicationUri='tcm:0-26-1')
2015-11-05T20:23:41 TcmServiceHost  8   GetStubFolderId:stubConfig.Id='tcm:24-29285-2'
2015-11-05T20:23:42 TcmServiceHost  8   The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:10'.
   at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan timeout)
   at System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan timeout)
   at System.ServiceModel.Channels.TransportDuplexSessionChannel.EnsureInputClosed(TimeSpan timeout)
   at System.ServiceModel.Channels.TransportDuplexSessionChannel.OnClose(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnClose(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.MessageRpc.CloseChannel()
The read operation failed, see inner exception.
   at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:10'.
   at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
   at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
   at System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)

2015-11-05T20:23:42 TcmServiceHost  8   The given key was not present in the dictionary.
   at Tridion.ExternalContentLibrary.DomainModel.UserContext.<>c__DisplayClass6b.<GetEclItemsFromTcmUris>b__64(IContentLibraryItem i)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Tridion.ExternalContentLibrary.DomainModel.UserContext.GetEclItemsFromTcmUris(IEnumerable`1 tcmUris)
   at Tridion.ExternalContentLibrary.Service.EclService2012.GetEclItemTitlesFromTcmUri(IEnumerable`1 tcmItemUris)
   at SyncInvokeGetEclItemTitlesFromTcmUri(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Tridion.ExternalContentLibrary.Service.TransactionSupportInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

2015-11-05T20:23:42 TcmServiceHost  25  GetStubSchemaId(publicationId='26')
2015-11-05T20:23:42 TcmServiceHost  25  TryGetStubSchemaId(publicationId='26')
2015-11-05T20:23:42 TcmServiceHost  25  GetStubFolderId(publicationUri='tcm:0-26-1')
2015-11-05T20:23:42 TcmServiceHost  25  GetStubFolderId:stubConfig.Id='tcm:24-29285-2'
2015-11-05T20:23:42 TcmServiceHost  25  GetStubSchemaId(publicationId='26')
2015-11-05T20:23:42 TcmServiceHost  25  TryGetStubSchemaId(publicationId='26')
2015-11-05T20:23:42 TcmServiceHost  25  GetStubFolderId(publicationUri='tcm:0-26-1')
2015-11-05T20:23:42 TcmServiceHost  25  GetStubFolderId:stubConfig.Id='tcm:24-29285-2'
2015-11-05T20:23:42 TcmServiceHost  25  GetStubSchemaId(publicationId='26')
2015-11-05T20:23:42 TcmServiceHost  25  TryGetStubSchemaId(publicationId='26')
2015-11-05T20:23:42 TcmServiceHost  25  GetStubFolderId(publicationUri='tcm:0-26-1')
2015-11-05T20:23:42 TcmServiceHost  25  GetStubFolderId:stubConfig.Id='tcm:24-29285-2'
2015-11-05T20:23:42 w3wp    38  The given key was not present in the dictionary.

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Tridion.ExternalContentLibrary.Service.Client.ISessionAwareEclService.GetEclItemTitlesFromTcmUri(IEnumerable`1 tcmItemUris)
   at Tridion.ExternalContentLibrary.UI.DataExtenders.UriUpdaters.UriUpdaterBase.TransformTcmUrisToEclUris(XElement contentElement, PipelineContext pipeline)
   at Tridion.ExternalContentLibrary.UI.DataExtenders.UriUpdaters.XmlUpdater.ProcessItemXml(XmlTextReader xReader, PipelineContext pipelineContext, Predicate`1 isElementToProcess, Action`2 updateElement)
   at Tridion.ExternalContentLibrary.UI.DataExtenders.UriUpdaters.UriUpdaterBase.ProcessCallResponse(XmlTextReader xReader, PipelineContext pipelineContext)
   at Tridion.ExternalContentLibrary.UI.DataExtenders.UriUpdaters.XmlUpdater.ProcessResponse(XmlTextReader reader, PipelineContext context)

2015-11-05T20:23:43 TcmServiceHost  25  The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:10'.
   at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan timeout)
   at System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan timeout)
   at System.ServiceModel.Channels.TransportDuplexSessionChannel.EnsureInputClosed(TimeSpan timeout)
   at System.ServiceModel.Channels.TransportDuplexSessionChannel.OnClose(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnClose(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.MessageRpc.CloseChannel()
The read operation failed, see inner exception.
   at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:10'.
   at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
   at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
   at System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)

2015-11-05T20:23:43 TcmServiceHost  25  The given key was not present in the dictionary.
   at Tridion.ExternalContentLibrary.DomainModel.UserContext.<>c__DisplayClass6b.<GetEclItemsFromTcmUris>b__64(IContentLibraryItem i)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Tridion.ExternalContentLibrary.DomainModel.UserContext.GetEclItemsFromTcmUris(IEnumerable`1 tcmUris)
   at Tridion.ExternalContentLibrary.Service.EclService2012.GetEclItemTitlesFromTcmUri(IEnumerable`1 tcmItemUris)
   at SyncInvokeGetEclItemTitlesFromTcmUri(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Tridion.ExternalContentLibrary.Service.TransactionSupportInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

2015-11-05T20:23:43 w3wp    38  The given key was not present in the dictionary.

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Tridion.ExternalContentLibrary.Service.Client.ISessionAwareEclService.GetEclItemTitlesFromTcmUri(IEnumerable`1 tcmItemUris)
   at Tridion.ExternalContentLibrary.UI.DataExtenders.UriUpdaters.UriUpdaterBase.TransformTcmUrisToEclUris(XElement contentElement, PipelineContext pipeline)
   at Tridion.ExternalContentLibrary.UI.DataExtenders.UriUpdaters.XmlUpdater.ProcessItemXml(XmlTextReader xReader, PipelineContext pipelineContext, Predicate`1 isElementToProcess, Action`2 updateElement)
   at Tridion.ExternalContentLibrary.UI.DataExtenders.UriUpdaters.UriUpdaterBase.ProcessCallResponse(XmlTextReader xReader, PipelineContext pipelineContext)
   at Tridion.ExternalContentLibrary.UI.DataExtenders.UriUpdaters.XmlUpdater.ProcessResponse(XmlTextReader reader, PipelineContext context)

It seems a problem with the socket timeout but I don't know which service is to increase the time. Also, all the lines in stack trace are related to SDL code or .net code. I don't see any stack trace of my provider. Any idea? Thank you!

2 Answers 2

2

I found the solution to my problem.

Basically, I was generating a different EclUri when I was creating a multimediaItem in GetFolderContent and when I create it in GetItem.

The subtype that I was assigning was different.

As said Hiren, The key was:

The given key was not present in the dictionary.

It seems CMS code verify the EclUri. It has to be consistent in all the process. Well done!

1

Looking at the entire error message socket timeout error is misleading.

The main error is:

The given key was not present in the dictionary.

That means the image that you have referenced in the component has been deleted from image library so due to stub component you are able to refer to it however stub component is not able to locate the image on image library (digital asset management system).

Try to change image to some other existing image on external content library and it should work fine.

Update

In that case there are issues with ECL where data is properly indexed so data that is required to save the component like ECL id is not received in time due to which you are seeing timeout. Recommendation: 1. Check the ECL service is working properly 2. Index the ECL database.

2
  • 1
    But It's when I try to save it. I navigate in my ECL Folder provider, I select the image and then I click on Save button. Then, the image exists in the image library. I suppose when I click on save the system calls GetItem / GetItems from my mountPoint class. I surrounded all the methods of my MountPoint in a Try/catch but I cannot capture any error. This is the reason that I think that the problem is in other place.
    – Guskermitt
    Nov 6, 2015 at 7:50
  • Updated my answer based on your input.
    – Hiren Kaku
    Nov 6, 2015 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.