c# - Unable to load external images in Silverlight -


I am trying to load an image from a URL in Silverlight and have not taken any action for it.

My code is as follows:

  imageUri = new Uri ("http://php.scripts.psu.edu/dept/iit/hbg/philanthropy/Images/ BlueSkyLarge.jpg ", UricundAdministrative); System Windows Media. Imaging Bitmap image bi = new system. Windows Media. Imaging Bitmap image (); Bi.UriSource = imagesUri; M_Image.Source = bi; M_Image.ImageOpened + = new event handler & lt; RoutedEventArgs & gt; (Image_Opened);  

The callback function (image_opin) is never called.

Is your Silverlight application running with domain php.scripts.psu.edu? If not, Silverlight will block access to this because it will not allow TCP requests made in any other domain from any domain.

Look for network restrictions in Silverlight.

Edit: Commenter is correct. This is a cross-zone issue that you are now seeing with the table indicating what one image (among others) can and can not do.


Comments