4

I'm implementing DD4T, and publish binary files to broker DB. To get binary from broker DB, I implemented "BinaryDistributionModule".

But following error occurred when request a WEB page.

   Exception type: NullReferenceException 
   Message: Object reference not set to an instance of an object
    DD4T.Providers.SDLTridion2013.TridionBinaryProvider.GetLastPublishedDateByUrl(String url)
    DD4T.Web.Binaries.BinaryFileManager.ProcessRequest(HttpRequest request)
    DD4T.Web.Binaries.BinaryDistributionModule.DistributionModule_OnPreRequestHandlerExecute(Object o, EventArgs eventArgs)
    System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I added following configuration to web.config:

<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
     <add name="BinaryModule" type="DD4T.Web.Binaries.BinaryDistributionModule" />
</modules></system.webServer>

I'm using following applications(.NET and DD4T), and I think BinaryDistributionModule suppors those versions.

  • .NET MVC4
  • DD4T support for MVC4 1.31.1

Is any other configuration required? Have anyone faced same problem?

Regards,

5

Did you add the binary file pattern regular expression to your web.config appSettings?

e.g.

<add key="DD4T.BinaryUrlPattern" value="^.*\.(jpg|JPG|gif|GIF|png|PNG)$" />
1
  • 1
    It works by adding the configuration to appSettings, but correct key value is "DD4T.BinaryUrlPattern". May 21 '15 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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