private bool DescargarBoletas(ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache cache) { FeatureSource featureSource = null; MobileServiceConnection con = null; FeatureSyncAgent featureSyncAgent = null; try { //Get an access to the FeatureSource as well as the MobileServiceConnection featureSource = cache.FeatureSources["CAPA_BOLETAS_INFRACCION"] as FeatureSource; con = new MobileServiceConnection(); con.Url = @"http://crdes05:6080/arcgis/rest/services/MuniCartago/Prueba/MobileServer"; featureSyncAgent = new FeatureSyncAgent(featureSource, con); featureSyncAgent.SynchronizeAttachments = true; featureSyncAgent.SynchronizationDirection = SyncDirection.UploadOnly; if (featureSyncAgent.IsValid) { FeatureSyncResults synResults = (FeatureSyncResults)featureSyncAgent.Synchronize(); if (synResults.DataSizeSent > 0) return true; else return false; } else { return false; } }//fin try catch (Exception ex) { return false; } finally { featureSyncAgent.Dispose(); con.Dispose(); } }
en System.Net.HttpWebRequest.finishGetResponse() en System.Net.HttpWebRequest.GetResponse() en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.BinaryWebService.ExecuteRequest(Stream stream) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.MobileServiceConnection.ExecuteRequest(Stream requestStream) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.MapDocumentConnection.Execute(Stream requestStream) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.FeatureSyncAgent.UploadEditStream(Stream stream, Dictionary`2 gidFidDictionary, FeatureSyncResults results) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.FeatureSyncAgent.Upload(QueryFilter uploadFilter, FeatureSyncResults results) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.FeatureSyncAgent.Synchronize() en Boletas_Infraccion.geotecnologias.co.cr.util.SincronizacionCache.DescargarBoletas(MobileCache cache) en Boletas_Infraccion.geotecnologias.co.cr.util.SincronizacionCache.Sincronizar() en Boletas_Infraccion.Form_CargaDescargaDatos.uiButton_descargarBoletas_Click(Object sender, UIMouseEventArgs e) en Resco.UIElements.UIElement.OnClick(UIMouseEventArgs e) en Resco.UIElements.Controls.UIElementControl.OnMouseUp(MouseEventArgs e) en System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam) en System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) en Resco.UIElements.Internals.NativeMethods.CallWindowProcCE(IntPtr prevWndFunc, IntPtr hWnd, WM msg, Int32 wParam, Int32 lParam) en Resco.UIElements.Internals.NativeMethods.CallWindowProc(IntPtr prevWndFunc, IntPtr hWnd, WM msg, Int32 wParam, Int32 lParam) en Resco.UIElements.Controls.UIElementControl.NativeWndProc(IntPtr hWnd, WM msg, Int32 wParam, Int32 lParam) en Microsoft.AGL.Forms.EVL.EnterModalDialog(IntPtr hwnModal) en System.Windows.Forms.Form.ShowDialog() en Boletas_Infraccion.Form_Principal.menuItem_cargaDescarga_Click(Object sender, EventArgs e) en System.Windows.Forms.MenuItem.OnClick(EventArgs e) en System.Windows.Forms.Menu.ProcessMnuProc(Control ctlThis, WM wm, Int32 wParam, Int32 lParam) en System.Windows.Forms.Form.WnProc(WM wm, Int32 wParam, Int32 lParam) en System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) en Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain) en System.Windows.Forms.Application.Run(Form fm) en Boletas_Infraccion.Program.Main()
Solved! Go to Solution.