After calling IContentLibraryContext.GetItem()
and IContentLibraryListItem.Id
for a Multimedia item (EclItemTypes.File
) the Tridion CME throws the following error. The exception does not show up in Visual Studio while attaced to the TcmServiceHost
process so I think something in the Tridion ECL ran into something unexpected.
I have compared the code against the Flickr example implementation but cannot find what I would do wrong. Any ideas why this error would pop up?
Unable to cast object of type Tridion.ExternalContentLibrary.AddInPipeline.V2.HostSideAdapters.ContentLibraryItemContractToViewHostAdapter' to type 'Tridion.ExternalContentLibrary.AddInPipeline.V2.HostViews.IContentLibraryMultimediaItem'.
Error detail:
StackTrace Information Details: at Tridion.ExternalContentLibrary.DomainModel.ItemDataBuilder.ToFullItemData(IContentLibraryItem item, String stubSchemaId, StubItemListData stubItemListData, IDictionary
2 displayTypes) at Tridion.ExternalContentLibrary.DomainModel.FileItemDataBuilder.BuildResultListItemData() at Tridion.ExternalContentLibrary.Service.EclService2012.GetFile(EclUri eclUri, Func
3 getStubId, Action1 stubItemManipulations, Nullable
1 openMode) at Tridion.ExternalContentLibrary.Service.EclService2012.GetItem(String itemUri, Int32 openMode) at SyncInvokeGetItem(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)