在Android中使用mvvmcross调用Windows Azure Mobile服务的ToListAsync()方法时出错

时间:2013-12-02 14:43:29

标签: xamarin.android xamarin mvvmcross azure-mobile-services

我在mvvmcross中使用AzureMobile Services构建应用程序当我调用ToListAsync()方法从Windows Phone 8中的服务器检索数据时,它工作正常,但Xamarin.Android中存在错误。任何人都建议我解决这个问题。

这是一个完整的错误堆栈

mvx:Warning: 39.64 Exception masked AggregateException: 
12-02 14:06:53.317 I/mono-stdout( 2032): mvx:Warning: 39.64 Exception masked AggregateException: 
      at System.Threading.Tasks.Task`1[System.Collections.Generic.List`1[EmployeeDirectoryCross.Core.Models.Employee]].get_Result () [0x00000] in <filename unknown>:0 
12-02 14:06:53.326 I/mono-stdout( 2032):      at System.Threading.Tasks.Task`1[System.Collections.Generic.List`1[EmployeeDirectoryCross.Core.Models.Employee]].get_Result () [0x00000] in <filename unknown>:0 
12-02 14:06:53.335 I/mono-stdout( 2032):   at EmployeeDirectoryCross.Core.ViewModels.EmployeeListViewModel+<>c__DisplayClass2.<SearchEmployees>b__1 () [0x00001] in e:\Study\Xamarin\XamrinSamples\EmployeeDirectoryCross\EmployeeDirectoryCross.Core\ViewModels\EmployeeListViewModel.cs:54 
12-02 14:06:53.335 D/Mono    ( 2032): Unloading image System.dll [0x2b365118].
12-02 14:06:53.335 D/Mono    ( 2032): Image addref System[0x2b354bf8] -> System.dll[0x2a6189d8]: 18
  at EmployeeDirectoryCross.Core.ViewModels.EmployeeListViewModel+<>c__DisplayClass2.<SearchEmployees>b__1 () [0x00001] in e:\Study\Xamarin\XamrinSamples\EmployeeDirectoryCross\EmployeeDirectoryCross.Core\ViewModels\EmployeeListViewModel.cs:54 
12-02 14:06:53.355 I/mono-stdout( 2032):   at Cirrious.CrossCore.Core.MvxMainThreadDispatcher.ExceptionMaskedAction (System.Action action) [0x00000] in <filename unknown>:0 

  at Cirrious.CrossCore.Core.MvxMainThreadDispatcher.ExceptionMaskedAction (System.Action action) [0x00000] in <filename unknown>:0 
12-02 14:06:53.355 I/mono-stdout( 2032): InnerException was MobileServiceInvalidOperationException: The server did not provide a response with the expected content.
InnerException was MobileServiceInvalidOperationException: The server did not provide a response with the expected content.
      at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+<SendRequestAsync>d__1c.MoveNext () [0x00000] in <filename unknown>:0 
12-02 14:06:53.355 I/mono-stdout( 2032):      at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+<SendRequestAsync>d__1c.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
12-02 14:06:53.355 I/mono-stdout( 2032): --- End of stack trace from previous location where exception was thrown ---

  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
12-02 14:06:53.365 I/mono-stdout( 2032):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
12-02 14:06:53.365 I/mono-stdout( 2032):   at System.Runtime.CompilerServices.TaskAwaiter`1[System.Net.Http.HttpResponseMessage].GetResult () [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.Net.Http.HttpResponseMessage].GetResult () [0x00000] in <filename unknown>:0 
12-02 14:06:53.385 I/mono-stdout( 2032):   at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+<RequestAsync>d__4.MoveNext () [0x00000] in <filename unknown>:0 

0 个答案:

没有答案