ArcGIS Silverlight API
ArcGIS Server 10
Visual Studio 2010
I have a web app built using ArcGIS Silverlight API that allows users to create simple simple point and line features.
When saving the edits, the code is jumping to fLayer_SaveEditsFailed and throws an error message.
This happens randomly. See code below.
Most of the times the edits are saved successfully.
There is no errors in ArcGIS Server log.
Also running Fiddler to debug on the user's machine is not currently an easy option as the system currently in live.
Any ideas?
if (fLayer.HasEdits)
{
intHasEditsCount++;
fLayer.BeginSaveEdits += new EventHandler<BeginEditEventArgs>(fLayer_BeginSaveEdits);
fLayer.EndSaveEdits += new EventHandler<EndEditEventArgs>(fLayer_EndSaveEdits);
fLayer.SaveEditsFailed += new EventHandler<TaskFailedEventArgs>(fLayer_SaveEditsFailed);
fLayer.SaveEdits();
}
private void fLayer_SaveEditsFailed(object sender, TaskFailedEventArgs args)
{
log.LogError("Failed to save edits. " + args.Error.Message);
log.LogError("Stack Trace:" + args.Error.StackTrace);
}
Failed to save edits. [HttpWebRequest_WebException_RemoteServer]
Stack Trace: at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at
System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)