【问题标题】:Why ArcGIS Runtime SDK for .Net sync geodatabase exception throw ""为什么 ArcGIS Runtime SDK for .Net 同步地理数据库异常抛出“”
【发布时间】:2019-02-02 00:00:44
【问题描述】:

我正在离线添加功能到功能服务。我的要素服务是可编辑的。我创建了一个地理数据库并向其中添加了一个功能。我可以看到我在地理数据库中添加的功能。但是,当我将地理数据库与要素服务同步时,出现“”错误。错误不只是“”;

代码如下;

GeodatabaseSyncTask syncTask = await GeodatabaseSyncTask.CreateAsync(featureServiceUri);

// Create sync parameters
SyncGeodatabaseParameters taskParameters = await syncTask.CreateDefaultSyncGeodatabaseParametersAsync(geodatabase);

// Create a synchronize geodatabase job, pass in the parameters and the geodatabase
SyncGeodatabaseJob job = syncTask.SyncGeodatabase(taskParameters, geodatabase);



MessageBox.Show(job.Status.ToString());
job.Start();
MessageBox.Show(job.Status.ToString());

job.JobChanged += (s, arg) =>
{
    // Report changes in the job status
    if (job.Status == JobStatus.Succeeded)
    {
        // Report success ...
        MessageBox.Show("Synchronization is complete!");
    }
    else if (job.Status == JobStatus.Failed)
    {
        // Report failure ...
        MessageBox.Show(job.Error.Message);
    }
    else
    {
        // Report that the job is in progress ...
        MessageBox.Show("Sync in progress ...");
    }
};


// await the completion of the job
await job.GetResultAsync();

await job.GetResultAsyn(); 行出现错误。

我做错了什么?

【问题讨论】:

    标签: c# esri offlineapps arcgis-runtime arcgis-runtime-net


    【解决方案1】:

    我认为您共享的代码没有任何问题。我想知道您是否在post 中遇到了同样的问题。

    您是否能够与其他功能服务同步?如果您能够监控 Web 流量,错误 JSON 可能包含 ArcGISWebException 中未填充但已记录的详细信息,我们将尝试在 API 的未来版本中修复此问题。

    【讨论】:

    • 感谢您的回答。我正在处理版本化数据。此方法正在对未版本化的数据进行同步。我尝试了未版本化的数据,它可以工作。我如何处理未版本化的数据。也许我在向地理数据库添加功能时犯了一个错误。
    猜你喜欢
    • 2018-02-09
    • 2010-12-09
    • 2011-01-04
    • 1970-01-01
    • 1970-01-01
    • 2011-04-24
    • 1970-01-01
    • 1970-01-01
    • 2018-11-24
    相关资源
    最近更新 更多