Question

I've seen many posts about the Google Geocoding API, described here: http://code.google.com/apis/maps/documentation/geocoding/

but none of them tries to use it from Silverlight. I'm using SL4, I'm trying to geocode an address (going from address to coordinates), and that works perfectly on my browser, but it does not work from SL4, because it tries to find a file named clientaccesspolicy.xml at the server, and (of course) it does not find it, because the API has nothing to do with Silverlight.

I'm using web services created by me, and I know I have to place the clientaccesspolicy.xml at the root of the domain, and that works perfect. The problem is with this Google Geocoding API, because it is not mine, and I cannot add the clientaccesspolicy.xml file at the server.

So, in general, how do you guys access, from Silverlight 4, PUBLIC web services that are not created by you (and therefore, for which you cannot create a clientaccesspolicy.xml file)?

If this is not possible from inside SL4, what about from SL4 out-of-the browser? And from WPF?

Was it helpful?

Solution

You need to setup a proxy server that has the clientaccesspolicy.xml and which then sends the request to the Geocoding API. In essence, the proxy server is allowing you to give SL4 what it needs, while at the same time passing on the request to the geocoding service.

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