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()<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The code itself is incredibly simple. So I am not sure where there would be an error in the code
var gdbTask <SPAN class="operator token">=</SPAN> await GeodatabaseSyncTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">CreateAsync</SPAN><SPAN class="punctuation token">(</SPAN>new <SPAN class="token function">Uri</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fportaldev.domin.com%2Fserver%2Frest%2Fservices%2FOperations%2FUpdatableFeaturesService%2FFeatureServer" target="_blank">https://portaldev.domin.com/server/rest/services/Operations/UpdatableFeaturesService/FeatureServer</A><SPAN>"</SPAN></SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> _portal<SPAN class="punctuation token">.</SPAN>Credential<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Geodatabase gdb <SPAN class="operator token">=</SPAN> await Geodatabase<SPAN class="punctuation token">.</SPAN><SPAN class="token function">OpenAsync</SPAN><SPAN class="punctuation token">(</SPAN>@<SPAN class="string token">"D:\Mobile\Operational\Bidirectional\UpdatableFeaturesService.geodatabase"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
await gdbTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">RegisterGeodatabaseAsync</SPAN><SPAN class="punctuation token">(</SPAN>gdb<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
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