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

Image showing as broken image icon

1 Answer 515 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 23 Mar 2012, 07:15 PM
 Hi,
I have some binary images stored as 64-bit strings in my database. I'm using SQL to convert this value to a Byte[] (array) and I'm using a radbinaryimage control within a listview that is databound to my openaccesslinq data source. (and this is pointed to the data field containing the byte[].) It appears to be working except,  Instead of my image showing it's showing a broken image icon as shown in the screenshot attached. I have no idea how to troubleshoot this, but I did notice something strange. When I right click on this image and click "open in new tab" chrome begins a download of a file called "Telerik.Web.UI.WebResource.axd" If i view this file in a text editor, it's actually the 64-bit string that is the original value in my database. This doesn't make sense though, because i'm converting it to a byte[] within the view I'm using, the radbinaryimage control should never see the 64-bit string. So i'm wondering, does radbinary image convert from a byte[] to a 64-bit string to display the image? If so, is there a way to simply use the 64-bit string that I already have in the database?


 Either way, does anyone have any advice on how to troubleshoot this?




1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 26 Mar 2012, 01:52 PM
Hi Brandon,

I saw and answered your support ticket on the same issue. If you have further questions, please post them there.
For others who might be interested, here is the main part of the reply:

As long as you provide a valid image through the byte array, you should not have a problem with displaying the issue, except for the cases where your site operates on a WebFarm or WebGarden environment (these are unsupported by RadBinaryImage).

If you are not sure how to check the image, you could see if it is correctly displayed when streamed through a custom http handler, as the one shown in this thread:
http://stackoverflow.com/questions/1738020/bytearray-to-image-asp-net
 
All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
BinaryImage
Asked by
Chris
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or