Base64 Image not rendering in IE8

Very odd problem and I can't work out the cause.  

I have a method that creates and image of a .net Chart Object, converts it to a base64 string and spits it out to the browser (via a web service/JSON string).  Every thing was peachy until one of my testers started noticing that *some* graphs were not being rendered by IE.  

Here is the code that generates the Base64 string - please note that this is working just fine.  All *modern* browsers are consuming this just fine:

            Dim imageStream As New System.IO.MemoryStream()
            GraphObj.SaveImage(imageStream, ChartImageFormat.Png)
            result.ImageString = Convert.ToBase64String(imageStream.ToArray())

Open in new window

"result" is a generic List(of ) that contains a string object called ImageString.

I've attached an HTML that contains the resulting Base64 strings added to an img tag (<img src="data:image/png;base64,......").

If you open that file in IE9, FF, Chrome, and Safari, both of the images display.  IE8 chokes on the first one.  I'm in a corporate environment where IE8 is the forced standard.

Any insight would be greatly appreciated.

LVL 16
Steve KrileAsked:
Who is Participating?
Steve KrileConnect With a Mentor Author Commented:
Figured it out.  The problem is size:

From this :

Internet Explorer 8: Microsoft has limited its support to certain "non-navigable" content for security reasons, including concerns that JavaScript embedded in a data URI may not be interpretable by script filters such as those used by web-based email clients. Data URIs must be smaller than 32 KiB in Version 8.[3] Data URIs are supported only for the following elements and/or attributes...

So.  Size matters.  Blah!
HainKurtSr. System AnalystCommented:
Steve KrileAuthor Commented:
Thanks Hain, but that's not it.  As long as the file size is <32kb, they display just fine in all my IE8 test machines.  As soon as a user generates a "complicated" graph with lots of colors and such (and therefore file size > 32kb) it breaks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.