flaithbheartaigh / dynamic-delivery-4-tridion

Automatically exported from code.google.com/p/dynamic-delivery-4-tridion
Other
0 stars 0 forks source link

Error caused by BinaryDistributionModule #41

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Not every binary does this, and when refreshing it does get the images, but 
something is going wrong here when requesting a page containing images:

Error message
System.Collections.Generic.KeyNotFoundException: The given key was not present 
in the dictionary.

Stack trace
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at DD4T.Factories.BinaryFactory.get_BinaryProvider()
at DD4T.Factories.BinaryFactory.FindLastPublishedDate(String url)
at DD4T.Web.Binaries.BinaryFileManager.ProcessRequest(HttpRequest request)
at 
DD4T.Web.Binaries.BinaryDistributionModule.DistributionModule_OnPreRequestHandle
rExecute(Object o, EventArgs eventArgs)
at 
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IEx
ecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& 
completedSynchronously)

Original issue reported on code.google.com by mg.bo...@innercore.eu on 3 Mar 2014 at 8:18

GoogleCodeExporter commented 8 years ago
Judging by the stack trace it seems to go wrong when instantiating the 
BinaryProvider property of the BinaryFactory. Could it be something in your DI? 
Or maybe you are using a custom PublicationResolver?

Original comment by quirijn....@gmail.com on 2 Apr 2014 at 10:15

GoogleCodeExporter commented 8 years ago
I don't have a custom PublicationResolver running. 
This is only happening when there are no Binaries in the BinaryData folder and 
visiting the website for the first time. After refreshing it works again. So it 
happens when there are a couple of binaries (images) on a page that need 
retrieving from the database.

Original comment by mg.bo...@innercore.eu on 2 Apr 2014 at 10:33

GoogleCodeExporter commented 8 years ago
We think it is caused by concurrent access to the _binaryProvider field in the 
BinaryProvider getter property in BinaryFactory.

Original comment by quirijn....@gmail.com on 2 Apr 2014 at 7:28