Azure 移动服务错误 --- 请求无法完成。 ()

标签 azure xamarin mvvmcross azure-mobile-services

我正在使用带有 .net 后端的 Azure 移动服务,以及使用基于 Xamarin Pcl 的解决方案的 MvvmCross。 当我从 Azure 移动服务提供的默认浏览器界面以交互方式运行该服务时,该服务会返回结果。我还使用离线数据同步功能。我可以将数据推送到服务器并且它可以工作,但是现在当我尝试从服务器提取数据时。

{Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: The request could not be completed. () at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.d__1d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.<RequestAsync>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.WindowsAzure.MobileServices.MobileServiceTable.d__f.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.WindowsAzure.MobileServices.MobileServiceTable.<ReadAsync>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.WindowsAzure.MobileServices.Sync.PullAction.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.WindowsAzure.MobileServices.Sync.TableAction.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.WindowsAzure.MobileServices.Sync.MobileServiceSyncContext. d__3b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.WindowsAzure.MobileServices.Sync.MobileServiceSyncContext.d__27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at AgLiveMobile.Core.Services.EmployeeService.d__4.MoveNext()}

我什至调试了从客户端到服务器的服务,结果出来了,但我不知道为什么会发生这种情况。我正在启用 Wifi 连接的 Windows Phone 8.1 设备上进行测试。

请帮忙。

最佳答案

进一步分析VS异常对话框中的http响应。实际错误是404 Not found。然后进一步调试问题发现Azure移动服务的应用程序url应该是https而不是http

如果产品团队能够发现这一点并给出正确的错误消息,那就太好了,这可以节省大量时间,而且开发人员也不会感到沮丧。

关于Azure 移动服务错误 --- 请求无法完成。 (),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27211936/

相关文章:

xamarin - 如何使用 MvvmCross 创建 MasterDetailPage?

sql - SQL Reporting Services 是否可与 Azure 或任何其他 Azure 新推出的报告服务一起使用?

Azure 存储模拟器无法初始化 Azure SDK 2.4

android - 错误 - 找不到与给定名称匹配的资源(在 'MvxItemTemplate' 处,值为 '@layout/WorkViewItem')

c# - 如何从代码动态填充ListPreference?

c# - 在 Sqlite.net PCL 中找不到 SQLitePlatformIOS

xamarin.android - MVVMCross for android - 如何在代码中进行绑定(bind)?

c# - ASP.NET Entity Framework 插入(如果不存在)

Azure DevOps管道: Create a text file with the current build number

macos - 在 Mac 上包括带有静态链接 (mkbundle)Mono Exe 的 GTK# Dll