0
votes

I am getting Exception "System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess"

When I want to store single text to Azure.

Initially its working fine but I have created a new app service on Azure and update service url. then its not working properly. Now I have two App Service and using common DB and DB server.

Log: [0:] System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00026] 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.TaskAwaiter1[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.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Net.Http.HttpClient+d__49.MoveNext () [0x000ca] 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.TaskAwaiter1[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.TaskAwaiter1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+d__18.MoveNext () [0x000f0] 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.TaskAwaiter1[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.TaskAwaiter1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceTable+d__43.MoveNext () [0x0007f] 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.TaskAwaiter1[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.TaskAwaiter1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceTable1+<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.TaskAwaiter1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceTable1+<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.MobileServiceTable1+d__5[T].MoveNext () [0x00069] 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 App4.TodoItemManager+d__13.MoveNext () [0x00058] in c:\users\parmendra\documents\visual studio 2015\Projects\App4\App4\App4\TodoItemManager.cs:102 Thread finished: #18

1
did it ever work with the db in azure or it worked for a local db only ?. also add the stack trace if any to have more idea about the error.Aravind
yes implement only Azure dbParmendra
check if the target table available is available in the azure db, check if azure firewall allows ip address of the machine that you are testing this.Aravind
Do you run it locally or on Azure? If possible, please add the demo code and add the which line get the error. Also as Aravind mentioned that please also check the firewall setting.Tom Sun - MSFT

1 Answers

0
votes

I have done this... :) Both service are conflict I have created new one and its working fine