minerjoe

RegisterGeodatabaseAsync does not work with versioned data

Discussion created by minerjoe on Mar 31, 2017
Latest reply on May 23, 2017 by minerjoe

I have had this conversation with multiple people on the development team at conferences over the couple years.  Everyone will always assure me that it will be/is possible to register an offline database that uses versioned data.  Because I had only done this on pre-release on beta versions I took their word is being true once the 100.0 version was released.

 

However, after finally getting around to setting and running tests with the release version I will again argue it is not possible.  Whenever I try I get the following error.

 

Esri.ArcGISRuntime.Http.ArcGISWebException: Unable to complete operation.
at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
at RuntimeCoreNet.GeneratedWrappers.CoreTask.Get()
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions.TaskCompletedCallbackHandler.OnCompleted(Object sender, EventArgs e)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions.TaskCompletedCallbackHandler.<CreateInternal>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()

The code itself is incredibly simple.  So I am not sure where there would be an error in the code

 

var gdbTask = await GeodatabaseSyncTask.CreateAsync(new Uri("https://portaldev.domin.com/server/rest/services/Operations/UpdatableFeaturesService/FeatureServer"), _portal.Credential);


Geodatabase gdb = await Geodatabase.OpenAsync(@"D:\Mobile\Operational\Bidirectional\UpdatableFeaturesService.geodatabase");
await gdbTask.RegisterGeodatabaseAsync(gdb);

 

 

 

Also, looking at the documentation I notice this piece about registering offline databases

After taking copies of the original database, do not sync changes to the original until all copies have been registered.

 

Perhaps I am unclear on what that means, but in a large implementation this seems an impossible condition to meet.  We are deploying to over 600 users there is no way you can get every machine setup in advance of some users going out in the field and making edits that need to be synched.

 

Justin Colville

Will Crick

Outcomes