c# - Unable to load an external image in Silverlight - "ag e network error" exception -
I am using Silverlight 4 and I am experiencing the following problem: First of all, code:
bitmap image bitmap image = new bitmap image (); Bitmapmize Create Option = Bitmapcreate Option. Ignore Image Catch; BitmapImage.DownloadProgress + = New Event Handler & lt; DownloadProgressEventArgs & gt; (BitmapImage_DownloadProgress); BitmapImage. Urisoro = new uri ("http://choteborsky.aspone.cz/Images/Label.png", UricandAssolute); BitmapImage.ImageFailed + = New Event Handler & lt; ExceptionRoutedEventArgs & gt; (Bitmap image_example);
The bitmap image activates the ImageFailed event with "Image and Network Exceptions" I do not seem to be able to load any external images, even if I do. Do I need to configure something special or not doing this work? Thank you
The server on which the image is hosted requires a crossdomain.xml file, cross- Domain Permission Requests File should look like, almost:
& Lt; Allow / -to & gt; & Lt; For grant & gt; & Lt; In the resource-subpaths = "true" path = "/" /> & Lt; / For grant & gt; & Lt; / Policy & gt; & Lt; / Cross-domain use & gt; & Lt; / Access-Policy & gt;
This creates a wide open.
Comments
Post a Comment