I’m using Silverlight 4 and I’m experiencing the following problem:
First off, the code:
BitmapImage bitmapImage = new BitmapImage();
bitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
bitmapImage.DownloadProgress += new EventHandler<DownloadProgressEventArgs>(bitmapImage_DownloadProgress);
bitmapImage.UriSource = new Uri("http://choteborsky.aspone.cz/Images/Label.png", UriKind.Absolute);
bitmapImage.ImageFailed += new EventHandler<ExceptionRoutedEventArgs>(bitmapImage_ImageFailed);
The bitmapImage fires the ImageFailed event with the “ag e network exception”. I seem to be unable to load any external images, no matter what I do. Is there something special I need to configure or why is it not working?
Thanks
Ok, I was able to find a workaround solution. Instead of trying to get the SL client to download the image from the server on which is sitting my ASP.NET app, I use a WCF service to stream the data directly to the SL client where I’m able to reconstruct them into BitmapImage type without any trouble