从Xamarin.forms将数据保存到Azure时,如何解决超时异常

时间:2018-08-09 08:03:44

标签: azure xamarin.forms

我收到异常“ System.Threading.Tasks.TaskCanceledException:在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess上,任务已取消。”

当我要将单个文本存储到Azure时。

最初它可以正常工作,但是我已经在Azure上创建了一个新的应用程序服务并更新了服务URL。那么它就不能正常工作。 现在,我有两个App Service,并且使用通用的数据库和数据库服务器。

日志: [0:] System.Threading.Tasks.TaskCanceledException:任务已取消。   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x00026]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务)[0x00028]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x00008]处   在System.Runtime.CompilerServices.TaskAwaiter 1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x00528] in <35658e59c86d40bdbb2ef0bb34b4f0c7>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable 1 + ConfiguredTaskAwaiter [TResult] .GetResult()在[657aa8fea4454dc898a9e5f379c58734>:0中   在System.Net.Http.HttpClient + d__49.MoveNext()[0x000ca]在<35658e59c86d40bdbb2ef0bb34b4f0c7>:0中 ---从之前引发异常的位置开始的堆栈结束跟踪---   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()[0x0000c]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x0001a]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务)[0x00028]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x00008]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter 1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+<SendRequestAsync>d__26.MoveNext () [0x00076] in <24dbefba60fd49f4b193cdf58abf3290>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter 1 [TResult] .GetResult()[0x00000]中   在<24dbefba60fd49f4b193cdf58abf3290>:0中的Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient + d__18.MoveNext()[0x000f0]中 ---从之前引发异常的位置开始的堆栈结束跟踪---   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()[0x0000c]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x0001a]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务)[0x00028]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x00008]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter 1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceTable+<>c__DisplayClass23_0+<<InsertAsync>b__0>d.MoveNext () [0x000c1] in <24dbefba60fd49f4b193cdf58abf3290>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter 1 [TResult] .GetResult()[0x00000]中   在<24dbefba60fd49f4b193cdf58abf3290>:0中的Microsoft.WindowsAzure.MobileServices.MobileServiceTable + d__43.MoveNext()[0x0007f]中 ---从之前引发异常的位置开始的堆栈结束跟踪---   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()[0x0000c]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x0001a]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务)[0x00028]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x00008]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter 1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceTable+<InsertAsync>d__23.MoveNext () [0x0011f] in <24dbefba60fd49f4b193cdf58abf3290>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter 1 [TResult] .GetResult()[0x00000]中   在<657aa8fea4454dc898a9e5f379c58734>:0中的Microsoft.WindowsAzure.MobileServices.MobileServiceTable 1+<TransformHttpException>d__31[T].MoveNext () [0x00066] in <24dbefba60fd49f4b193cdf58abf3290>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter 1 [TResult] .GetResult()[0x00000]中   在Microsoft.WindowsAzure.MobileServices.MobileServiceTable 1+<InsertAsync>d__6[T].MoveNext () [0x000f1] in <24dbefba60fd49f4b193cdf58abf3290>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceTable 1 + d__5 [T] .MoveNext()[0x00069]在<24dbefba60fd49f4b193cdf58abf3290>:0中 ---从之前引发异常的位置开始的堆栈结束跟踪---   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()[0x0000c]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x0001a]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务)[0x00028]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x00008]处   在<657aa8fea4454dc898a9e5f379c58734>:0中的System.Runtime.CompilerServices.TaskAwaiter.GetResult()[0x00000]处   在c:\ users \ parmendra \ documents \ visual studio 2015 \ Projects \ App4 \ App4 \ App4 \ TodoItemManager.cs:102中的App4.TodoItemManager + d__13.MoveNext()[0x00058] 线程完成:#18

1 个答案:

答案 0 :(得分:0)

我已经完成了... :)两种服务都冲突,因此我创建了一个新服务并且工作正常