kuiperfoliage

Serialization error when trying to display Layer on Map

Discussion created by kuiperfoliage on Dec 20, 2012
Hi,

One of our developers get the following error on his application when he tries to display a layer on the map. The layer will display correctly on the Javascript browser on the Runtime webservices endpoint, but it can not be consumed by the Map control.

Do you have any idea what is going wrong or how we can better debug this? We could consider using Fiddler and are looking into getting reflector installed on his machine, but I was curious if there was some other way we could get additional debugging information for Esri as this is the only machine that we get this error on. Other developers with the same code are not experiencing this problem.

Greetings Bjorn

2012-12-20 10:10:54: WARN  Module=[Not Defined] Id=(null) Unable to load layer: ESRI.ArcGIS.Client.Local.LocalServerException: Could not retrieve information on the layers in a 'MapService'. ---> System.Runtime.Serialization.SerializationException: ValueType 'System.Int32' cannot be null.
   at ReadSpatialReferenceFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] )
   at System.Runtime.Serialization.Json.JsonClassDataContract.ReadJsonValueCore(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context)
   at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)
   at ReadMapServiceInfoFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] )
   at System.Runtime.Serialization.Json.JsonClassDataContract.ReadJsonValueCore(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context)
   at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
   at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader)
   at ESRI.ArcGIS.Client.Local.Internal.Json.Deserialize[T](String json)
   at ESRI.ArcGIS.Client.Local.Internal.Requests.ProcessResponse[TExpectedResponse](String url, String queryParameters, Exception err, Boolean cancelled, String result, Action`2 callback)
   --- End of inner exception stack trace ---

Outcomes