views:

37

answers:

5

Hello. I've got a Silverlight4 app that I'm running on https, deployed to Azure. Everything's working except for one small glitch. I've got content in the form of jpg thumbnails and associated zip files with a .gld extension. My app is supposed to display the thumbnails, and allow the users to download the associated .gld/zip files.

The downloads works fine, but, the thumbnails won't display in my UI. I get AG_E_NETWORK_ERROR from my ImageFailed handler. I do have a clientaccesspolicy.xml file in the root of my cdn domain. Fiddler does not show Silverlight accessing this file.

Here's the clientaccesspolicy.xml:

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from>      
        <domain uri="*"/>
        <domain uri="http://*"/
        <domain uri="https://*"/&gt;
      </allow-from>      
      <grant-to>      
        <resource path="/" include-subpaths="true" />
      </grant-to>      
   </policy>
  </cross-domain-access>
</access-policy>

I'm stumped as to how Silverlight can access the downloadable content, but not the image files. The app does pick up the thumbnails if I deploy them to blob storage in azure (with the same clientaccesspolicy.xml file in the $root folder), but it would be ideal if I can continue the same file structure that already exists on my cdn provider.

Everything displays perfectly if the Silverlight app runs in http rather than https.

Thanks in advance for any ideas!

Michael Conner

A: 

You are missing a ">" in line 7.

Joe
thanks - I've corrected, but still no luck.
Michael Conner
A: 

Check the uri used in fiddler or the like, check images are using https

pkr2000
We can't access the images using https. That's the issue. Our content delivery network doesn't support it.
RobinDotNet
A: 

try to implement more debug output - maybe like this:

You can trap the error. BitmapImage, Image, ImageBrush, MultiScaleImage all have an ImageFailed event. Just set an event handler to it.

Joe
A: 

or try this:

<allow-from http-request-headers="*">
Joe
A: 

thanks for all the suggestions - have tried them all -- still no luck, sadly. ImageFailed event for bitmap doesn't give much detail, unfortunately. I think we maybe be up against the cross-scheme restriction on image files.

Michael Conner