Silverlight - Loading google mapsengine WMS layer

4100
7
10-22-2014 08:08 PM
MuthuKumaran
New Contributor

Need help!

Tried loading google mapsengine wms (https) layer using both ArcGIS API for Flex and Silverlight

Flex:

Loads the layer successfully after sequence of below request (success)

  1. Request to crossdomain.xml
  2. Request to mapsengine WMS layer

Where as

Silverlight:

Failed to load layer – when examine the request sequence below

  1. Request to clientaccesspolicy.xml  ( failed)
  2. Request to crossdomain.xml ( success)
  3. WMS map request not place as (1) failed

Why Silverlight seeking clientaccesspolicy.xml ? where as Flex don't?

Also try deploy Silverlight both http and https but still failed.

Seems google mapsengine does not have clientaccesspolicy.xml

Any advice much appreciated .

Thanks in advance.

Tags (1)
0 Kudos
7 Replies
DominiqueBroux
Esri Frequent Contributor

Why Silverlight seeking clientaccesspolicy.xml ? where as Flex don't?

ClienAccessPolicy is a Silverlight thing so it's normal that FLEX doesn't try accessing it.

Silverlight supports 2 different mechanisms for services to opt-in to cross-domain access: either using  ClientAccessPolicy.xml or CrossDomain.xml (More Info)

Seems google mapsengine does not have clientaccesspolicy.xml

Google maps engine seems to have a ClientAccessPolicy file, So a Silverlight app should be able to get it. What is the url of the request to clientaccesspolicy.xml that fails?

I you can share the URL of your public Google mapsengine WMS service, I will give a try.

/Dominique

0 Kudos
MuthuKumaran
New Contributor

Dominique thanks for your response;

a) https://mapsengine.google.com/clientaccesspolicy.xml

I'm getting it   HTTP 404 Not Found

Wondering does this works for you good???

b)

Where as  https://mapsengine.google.com/crossdomain.xml    => works fine

This is what I mentioned exactly.

Cheers

0 Kudos
DominiqueBroux
Esri Frequent Contributor

Hi Muthu,

You are right, the crossdomain file exists and the clientaccesspolicy doesn't. I said the opposite sorry about that.

The issue seems to be that the crossdomain file doesn't allow any request, so a Silverlight app can't access to the service (should be the same result for a FLEX app, isn't it?).

Out of asking Google to change that :-), the workaround is to use a proxy and send the wms request through the proxy (that needs you set up a proxy and set the ProxyUrl of the WMS layer).

/Dominique

0 Kudos
MuthuKumaran
New Contributor

Hi Dominique B,

I try the workaround by sending WMS request through the proxy... no able to get it...

Any advise... Please 

esri:WmsLayer Url="https://mapsengine.google.com/......../wms/" Layers="Hybrid,03561566670629157711-16436634626419741036-4"

ProxyUrl="http://<domain address>/SLProxyPage/proxy.ashx"/>

Thanks

0 Kudos
MuthuKumaran
New Contributor

Also I deployed the test app in server that does not required proxy as well but still same issue..

some reason it keep seeking policy file...

0 Kudos
DominiqueBroux
Esri Frequent Contributor

Hi Muthu,

Using a proxy doesn't prevent Silverlight from checking the Policy file. You need to have a cross domain Policy file at the root of your proxy server.

The main advantage of the proxy is that the server is in your hands while the google server is not.

For testing purpose, you can use the ArcGIS SL demo proxy:

ProxyUrl="http://servicesbeta3.esri.com/SilverlightDemos/ProxyPage/proxy.ashx"

That may give a clue about your issue.

You should see a succesful request to http://servicesbeta3.esri.com/clientaccesspolicy.xml  and then the requests to the Google mapengine going though the proxy.

0 Kudos
DominiqueBroux
Esri Frequent Contributor

Additional info:

I deployed the test app in server that does not required proxy

Except if you deploy in Google server, a proxy is always required to access the Google server that has no cross domain Policy file (or actually has a Policy file that denies access)

0 Kudos