This is a migrated thread and some comments may be shown as answers.

RadBinaryImage throws error on production server not on dev

1 Answer 89 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 23 Jun 2011, 12:40 PM
Hi,

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.

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 28 Jun 2011, 08:14 AM
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,
Iana
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.

Tags
BinaryImage
Asked by
Karl Wilkens
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or