首页 > 解决方案 > Azure MobileServiceClient 可以 InsertAsync 但不能 ReadAsync

问题描述

我可以创建一个 MobileServiceClient 和GetTable<Model>()to InsertAsync,并查看我的模型是如何插入到 Azure 中的 Easy Table 表中的。但是当我ReadAsync()从表中得到以下错误时:

Microsoft.WindowsAzure.MobileSerices.MobileServiceInvalidOperation: The server did not provide a response with the expected content.

这是当我mobileServiceClient.GetTable<Model>.ReadAsync()

可能是什么问题呢?

Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();这是从没有调用的 MsTest 项目运行时。运行应用程序时读取有效

标签: azurexamarinazure-mobile-services

解决方案


我有同样的问题。

根据GitHub 问题

As @elamalani pointed out above, we don't support .Net Core 2.1 in the SDK today. Unfortunately, we don't have a workaround today and like Ela said, the we don't have an ETA for a new release or other SDK to use for .Net Core 2.1 compatibility yet, so your only workaround is to stick with .Net Core 2.0 for now. 我也有 SDK 2.1 版

SDK 更改为 2.0 版后一切正常。请尝试制作相同的,希望它会帮助你


推荐阅读