Select to view content in your preferred language

Calling premium ArcGIS online layers from Silverlight

741
2
06-25-2010 12:02 PM
AaronCropper
Emerging Contributor
It seems that ESRI's documentation on calling the premium arcgisonline services from a silverlight application are not  very good.  I understand that you need to generate a token based off of the IP address but then only requests from that IP address will successfully call that service. 

How would I structure the proxy.config file to generate a user token programmatically.  I understand how to add ProxyURL to XAML file but how is the proxy.config file supposed to be structured.  I've tried this without any luck.  PLEASE HELP!!! 

Here is how I have set up my proxy.config but its not working:

<serverItem url="http://premium.arcgisonline.com/Server/rest/services/World_Imagery/MapServer"
                matchAll="true" tokenUrl="https://premium.arcgisonline.com/Server/tokens"
                username="myusername" password="mypassword"
                timeout="30" />

I've also tried the following but XML does not allow "&" in text strings:

<serverItem url="http://premium.arcgisonline.com/Server/rest/services/World_Imagery/MapServer"
                matchAll="true" tokenUrl="http://premium.arcgisonline.com/Server/tokens?request=getToken&username=myusername&password=mypasswo..."
                username="myusername" password="mypassword"
                timeout="30" />
0 Kudos
2 Replies
AaronCropper
Emerging Contributor
Anyone know how to configure proxy.config to call premium services from client machines?
0 Kudos
dotMorten_esri
Esri Notable Contributor
I'm guessing you are referring to the proxy sample available in the documentation. This proxy is just a sample. You can modify the proxy all you want to for instance just deal with a hardcoded user and domain, and skip reading the xml configuration file.
0 Kudos