Problem using local web services in JavaScript API

465
1
05-09-2013 09:47 AM
JonBarlett2
New Contributor
Good Morning.  My organization has recently installed ArcGIS Server and I have been able to successfully create some map services and use them to build ArcGIS.com maps and Silverlight Viewer applications.  I have previous experience with JavaScript and really want to use the JavaScript API, however, I have not been successful in utilizing MY services in any of the JavaScript examples.  I am able to download and use the JavaScript samples on my webserver, but if I switch the reference to one of my ArcGIS.com webmap IDs(using my services), the map is blank.  In the geocoding sample, if I switch the geocoding services to hit my geocoding service (instead of ESRIs),the geocoder doesn't work (it does in Silverlight).  In the REST services page I am able to successfully test the services using the JavaScript API.  I have read that I might need to setup token authentification or a proxy page, but I am able to consume and publish the services using Silverlight.  I am using 10.1.

Any guidance would be appreciated
0 Kudos
1 Reply
JeffPace
MVP Alum
Without seeing code it is difficult, but due to cross site scripting, you need a proxy page.

This is definitely the issue if your local services are on a different server from your application.
0 Kudos