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?

  • I tried a different clientaccesspolicy file and I'm now getting a securityException
    – user2218
    Mar 8, 2011 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, 2011 at 17:38
  • 1
    Run a network capture utility like Fiddler and post the actual response from your server.
    – Philip
    Mar 8, 2011 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, 2011 at 18:52
  • Hi Philip- I just now installed Fidler and am seeing where it is throwing an exception on my Dynamic MapService Layer. But how can I attach the exported har file on here?
    – user2218
    Mar 8, 2011 at 19:16

1 Answer 1


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.

  • -1 The poster has already answered his question in the comments. "I was not using the proper URL for the MapService." May 18, 2011 at 9:38