Azure MobileServiceClient can InsertAsync but not ReadAsync

怎甘沉沦 提交于 2019-12-24 17:50:01

问题


I can create a MobileServiceClient and GetTable<Model>() to InsertAsync, and see how my model gets inserted in the Easy Table table in Azure. But when I ReadAsync() from the table I get the following error:

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

This is when I mobileServiceClient.GetTable<Model>.ReadAsync()

What could be the problem?

This was when running from an MsTest project with no Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); call. The read worked when running the app


回答1:


I had the same problem.

According to GitHub Issue:

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. And I was also had SDK version 2.1

After changing SDK to version 2.0 all going to work fine. Please try to making the same, hope it will help you



来源:https://stackoverflow.com/questions/53671876/azure-mobileserviceclient-can-insertasync-but-not-readasync

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!