Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > BinaryImage > BinaryImage works sometimes

Not answered BinaryImage works sometimes

Feed from this thread
  • Sean avatar

    Posted on Jul 20, 2011 (permalink)

    I have been facing an issue with the BinaryImage object on our production server with very inconsistent results. Sometimes it displays the images, other times it's not displaying. This code and data work fine in my local environment, and in our test environment, but on the production server it starts having problems. The main differences between the servers is local+test environment is 32bit with full blown SQL server. Production environment is locked down heavily with permissions and is a 64bit machine running SQL Express.

    First let me describe the code real quick, In a MS SQL database I have a filestream column of raw image data that I pull out through a stored procedure, and access in the code via a data table. That data table is accessed on a Repeaters ItemDataBound event, and then sets the BinaryImage's DataValue property and perform a DataBind. I have added code to write out a raw file with the data from the DataValue property to ensure the data is valid and not corrupt. And those images all write out fine and can be viewed.

    I read on the BinaryImage documentation that the image is served from the browsers cache, and when that is disabled it is persisted on the server for 2 minutes, So I turned off caching in Fiddler and checked to see what response I get from the Telerik WebResource.axd. Out of 36 requests only 9 of them displayed. A couple of more refreshes and sometimes 8-10 images load. Just very inconsistent. The ones that don't show up show the HTTP request as 0 bytes with no content type.

    The telerik version I am using is the Q1 2011 release. Also tried Q2 2011 release with no difference.

    Does anyone have any ideas?

    Reply

  • Marin Marin admin's avatar

    Posted on Jul 25, 2011 (permalink)

    Hello Sean,

       The reason for this is probably because the internal HttpHandler cannot process properly the incoming data for some reason - for example if the binary data is too big to be passed as a single request or the image format is not handled properly. You should check whether you have any restrictions on the size of the transferred data.

    Hope this helps. 

    Best wishes,
    Marin
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

    Reply

  • Sean avatar

    Posted on Jul 25, 2011 (permalink)

    Marin,

    Thanks for the advice. I do not believe there was any issue with the binary data being too big. All of the data was being run through a function to turn the image into a thumbnail, and majority of all images on the page were roughly the same size. Also if I was to copy the raw URL to the telerik webresources file and refresh, sometimes it would end up loading. Unfortunately since this was happening in a production site my only solution was to remove all instances of the RadBinaryImage and replace with a custom HTTP Handler to serve the images.

    Thanks.  

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > BinaryImage > BinaryImage works sometimes