我正在开发一个 ASP.Net Core 网络应用程序,我尝试通过 Azure 移动后端连接它。
后端与其他 Windows 桌面应用程序配合良好。 到目前为止,后端在 ASP.Net Core v2.0 上运行良好。 昨天我安装了 ASP.Net Core 2.1 SDK,并将 Microsoft.AspNetCore.All nuget 包从 2.0 更新到 2.1.2,从那时起我收到以下异常: MobileServiceInvalidOperationException - “服务器未提供包含预期内容的响应。”
你能告诉我解决这个问题的任何方法吗?
最佳答案
Also the backend was working well till now with ASP.Net Core v2.0. Yesterday I installed the ASP.Net Core 2.1 SDK and I updated the Microsoft.AspNetCore.All nuget package from 2.0 to 2.1.2 and since then I am receiving the following exception: MobileServiceInvalidOperationException - "The server did not provide a response with the expected content."
根据您的描述,您的 Azure 移动后端可以按预期与 ASP.Net Core v2.0 一起工作。据我所知,移动后端只是为您提供了一种公开表/API 端点的简单方法。此外,您的网络应用程序如何使用 HttpClient 或 Azure Mobile Client SDK 连接到移动后端?
对于解决此问题的简单方法,您可以为您的 Azure 移动应用程序启用诊断日志记录以检索详细的错误消息以缩小此问题的范围,您可以遵循详细信息 here .
关于c# - ASP.Net Core 2.1 上的 Azure 移动后端连接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51483518/