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?

closed as off-topic by Evil Genius, Ian Turton Sep 26 '16 at 13:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – Evil Genius, Ian Turton
If this question can be reworded to fit the rules in the help center, please edit the 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
  • 1
    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
  • 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 '11 at 19:16

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." – MathiasWestin May 18 '11 at 9:38