MobileServiceTable.InsertAsync ZUMO-API-VERSION 错误

MobileServiceTable.InsertAsync ZUMO-API-VERSION Error

我正在尝试将 Azure 移动服务迁移到 Azure 应用服务。在 C# 中,我使用 MobileServiceClient.GetTable 来获得 MobileServiceTable object。有了这个,我尝试使用 MobileServiceTable.InsertAsync.

插入 object

升级后出现错误-

An invalid API version was specified in the request, this request needs to specify a ZUMO-API-VERSION of 2.0.0

我理解错误,但我不知道如何更新请求 headers 以添加此内容。这可能吗?

您需要更新SDK。删除 WindowsAzure.MobileServices SDK 并添加 Microsoft.Azure.Mobile.Client SDK。如果你使用离线同步,那么也要替换等效的 SQLiteStore 包。

有关详细信息,请参阅 https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-net-upgrading-from-mobile-services