RadBinaryImage throws error on production server not on dev

2 posts, 0 answers
  1. Karl Wilkens
    Karl Wilkens avatar
    206 posts
    Member since:
    Oct 2012

    Posted 23 Jun 2011 Link to this post


    We are using Q3 2010 and have a RadImage control that is throwing the following error - but only on production.

    Exception information:
    Exception type: ArgumentException
    Exception message: The provided binary data may not be valid image or may contains unknown header

    If I debug the same image in development, no errors are displayed/thrown. Our production environment and development operate in integrated mode and have the following handler entry

          <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />

    The error only occurs for a handful of images, but when it happens, it brings the entire page down. How can I test whether the data coming from sql is a valid image and catch this condition ahead of time? I have a try catch surrounding everything, but it does not appear to have an impact. I am guessing that the image control is outputting content that ends up corrupting the html output. Any thoughts welcome.
  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 28 Jun 2011 Link to this post

    Hello Karl,

    As the error message says, it seems that the data to which you are binding the RadBinaryImage is not valid. So the issue is related to the data, not the deployment environment. Can you try using the same data on the local machine for testing and see how it goes?

    All the best,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top