2017-10-27 3 views
0

Azure Mobile Appテンプレートを使用して、TableController APIを作成し、アズールに展開しました。Azure MobileServices TableControllerにアクセス中にサーバーエラーが発生しました

私はURLからテストし、私は

http://rkXXXXXXXXXXX.azurewebsites.net/tables/Person/f90cb37d51a34f8cb97432a57000c876?ZUMO-API-VERSION=2.0.0 

以下のURLを使用する場合、それは正常に動作しています今、私はXamarinは、それを消費するアプリを形成し、私がログに内部サーバーエラーを受けています作成し、それを使用することはできません。私は、サーバーアプリケーションを複数回展開してみました

{Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: The request could not be completed. (Internal Server Error) 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+<ThrowInvalidResponse>d__24.MoveNext() [0x001ec] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+<SendRequestAsync>d__26.MoveNext() [0x000fc] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+<RequestAsync>d__18.MoveNext() [0x000fa] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceTable+<>c__DisplayClass26_0+<<UpdateAsync>b__0>d.MoveNext() [0x000d4] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceTable+<TransformHttpException>d__43.MoveNext() [0x000bb] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceTable+<UpdateAsync>d__26.MoveNext() [0x00121] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceTable`1+<TransformHttpException>d__31[T].MoveNext() [0x000a0] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceTable`1+<UpdateAsync>d__8[T].MoveNext() [0x000e2] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at Microsoft.WindowsAzure.MobileServices.MobileServiceTable`1+<UpdateAsync>d__7[T].MoveNext() [0x00067] in <42e24ce875d34485ad11c4f8aebb904a>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at UXD.Services.PersonService+<SavePersonAsync>d__9.MoveNext() [0x000a4] in c:\RK\Services\PersonService.cs:268 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at System.Runtime.CompilerServices.TaskAwaiter.GetResult() [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
    at UXD.ViewModel.PersonViewModel+<ExecuteAddPersonCommandAsync>d__19.MoveNext() [0x00040] in c:\RK\ViewModel\PersonViewModel.cs:106 } 

:アプリケーションで受信したエラー

Detailed Error Information: 
Module  __DynamicModule_Microsoft.Owin.Host.SystemWeb.OwinHttpModule, Microsoft.Owin.Host.SystemWeb, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_78a91520-ed4c-4317-9401-f8ad17a561a6 
Notification  PreExecuteRequestHandler 
Handler ExtensionlessUrlHandler-Integrated-4.0 
Error Code  0x00000000 

Requested URL  http://rkXXXXXXXXXXX:80/tables/Person/f90cb37d51a34f8cb97432a57000c876 
Physical Path  D:\home\site\wwwroot\tables\Person\f90cb37d51a34f8cb97432a57000c876 
Logon Method  Anonymous 
Logon User  Anonymous 

例外をログ

public IMobileServiceTable<Person> PersonOnlineTable { get; set; } 
PersonOnlineTable = client.GetTable<Person>(); 
    public async Task SavePersonAsync(Person item) 
    { 
     if (item.Id == null) 
     { 
      await PersonOnlineTable.InsertAsync(item); 
     } 
     else 
     { 
      await PersonOnlineTable.UpdateAsync(item); 
     } 
    } 

アズールMainURLからは常に作業し、Appから呼び出すときは動作しません。これを解決するための任意のアイデア?

+0

モバイルサービスをローカルでデバッグし、そのアプリケーションをポイントするとどうなりますか? – LDJ

答えて

0

モデルオブジェクトのデータ型の不一致が原因で問題が発生しました。私はdatetimeオブジェクトをデータベース内にdatetimeoffsetと定義し、DTOオブジェクトにはdatetimeと定義しています。私のDTOオブジェクトのデータ型を変更した後、正常に動作しました。

関連する問題