Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run a simple Silverlight application based on code provided by ESRI at this link (Silverlight Samples). My app works fine if I just use the TiledLayer but if I add the Dynamic layer and set it to a Wells MapService I have running on my server, I get an error stating that the WellsLayer has a SerializationException and is not a valid JSON primitive and this error can occur when extraneous data is present after JSON data. What does that mean? I did see in the forums that someone suggested that a clientaccesspolicy may not be in place at the wwwroot folder. I have downloaded and placed that file there but no luck.. Thoughts?

share|improve this question
I tried a different clientaccesspolicy file and I'm now getting a securityException – user2218 Mar 8 '11 at 16:43
is the MapService REST endpoint located on the same server as the Silverlight XAP? You only need the clientaccesspolicy.xml file if the answer is no. Also, which version of ArcGIS server are you running? – Dan Walton Mar 8 '11 at 17:38
Run a network capture utility like Fiddler and post the actual response from your server. – Philip Mar 8 '11 at 18:51
Hi Dan- Yes, the MapService REST endpoint is located on the same server as the Silverlight App (XAP file). I'm running ArcGIS Server 10.0 and Silverlight 4.0 – user2218 Mar 8 '11 at 18:52
Post your findings as an answer and accept it - someone else might have the same problem later. – mwalker Mar 8 '11 at 19:50

As far as I know the JSON data file is used for mobile device or other device user-agents. Perhaps if you have something relating to GIS application and Device Targeting (may be Mobile Device or Other Devices) for which you are referring to JSON data and something is incorrectly configured to the JSON file. ... not sure if I am correct.

  • Regards,


share|improve this answer
-1 The poster has already answered his question in the comments. "I was not using the proper URL for the MapService." – MathiasWestin May 18 '11 at 9:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.