Collection was modified; enumeration operation may not execute.
In the Windows Phone SDK, instead of using Isolated Storage setting, can't the SDK use separate files(key-value, key being unique file name) to save relevant info?
Stack Trace
0 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
1 at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
2 at WriteArrayOfKeyValueOfstringanyTypeToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
3 at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
4 at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
5 at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
6 at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
7 at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
8 at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
9 at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
10 at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream stream, Object graph)
11 at System.IO.IsolatedStorage.IsolatedStorageSettings.Save()
12 at MobileAppTracking.MobileAppTracker.SaveLocalSetting(String key, Object value)
13 at MobileAppTracking.MobileAppTracker.GetUrlCallback(IAsyncResult result)
14 at System.Net.Browser.ClientHttpWebRequest.<>cDisplayClass1d.b1b(Object state2)
Apologies we were not able to get to this issue sooner. We do very much appreciate the detailed info you were able to provide. If you are still running into problems please do let us know.
Collection was modified; enumeration operation may not execute.
In the Windows Phone SDK, instead of using Isolated Storage setting, can't the SDK use separate files(key-value, key being unique file name) to save relevant info?
Stack Trace
0 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 1 at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext() 2 at WriteArrayOfKeyValueOfstringanyTypeToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract ) 3 at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context) 4 at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) 5 at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) 6 at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) 7 at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) 8 at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) 9 at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph) 10 at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream stream, Object graph) 11 at System.IO.IsolatedStorage.IsolatedStorageSettings.Save() 12 at MobileAppTracking.MobileAppTracker.SaveLocalSetting(String key, Object value) 13 at MobileAppTracking.MobileAppTracker.GetUrlCallback(IAsyncResult result) 14 at System.Net.Browser.ClientHttpWebRequest.<>cDisplayClass1d.b 1b(Object state2)