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.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I added following configuration to web.config:

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

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?


1 Answer 1


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


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

Your Answer

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

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