Question

I've been following a whole bunch of tutorials on how to get overlays working in bing maps silverlight and they all appear to not even mention this problem of mine.

Example of tutorial: https://alastaira.wordpress.com/2011/01/07/accessing-a-wms-tile-server-from-bing-maps-silverlight/

What is happening is i set the tilesource to something like: "http://wms1.ccgis.de/cgi-bin/mapserv?map=/data/umn/germany/germany.map&&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&SRS=EPSG%3A4326&BBOX={0}&WIDTH=256&HEIGHT=256&LAYERS=Bundeslaender"

When i run the application and check the calls with fiddler not a single call is made to this service. If i change the source to start with https then the calls are seen in fiddler.

I also tried spinning up a webclient and doing a get request on http://google.com and fiddler actually recorded a call to http://google.com/clientaccesspolicy.xml which seems to be in line with how its supposed to work.

I have the following xml files in my website root.

ClientAccessPolicy.xml

    <?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="SOAPAction">
        <!-- IMPORTANT! Include these lines -->
        <domain uri="https://*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

crossdomain.xml

<cross-domain-policy>
    <allow-access-from domain="*.*" headers="SOAPAction"/>
    <allow-http-request-headers-from domain="*.*" headers="SOAPAction"/> 
    <site-control permitted-cross-domain-policies="master-only"/>
</cross-domain-policy>

Anyone have any ideas? It just seems like the bingmaps SDK just refuses to even attempt an http call.

Was it helpful?

Solution

If your own Silverlight app is hosted on https, it cannot make requests to any http sites. I assume this is the reason - otherwise it should work

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top