I have copied the exception below. I have connected my Android device through VPN , If VPN connection failed then the FlurlHttp call is giving unhandled exception. I am developing application on Xamarin.Android. If device is connected through VPN then it's working fine. Please some one give some solution, how to handle it. How to get response StatusCode (200) using Flurl Http call ?
Flurl.Http.FlurlHttpException: Request to http://192.168.110.60/TestServices/MyCall.aspx?method=Test&username=abc&password=abc failed. A task was canceled. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
--- End of inner exception stack trace ---
at Flurl.Http.Configuration.FlurlMessageHandler+<SendAsync>d__1.MoveNext () [0x00000] in C:\projects\flurl\src\Flurl.Http.Shared\Testing\HttpCallAssertion.cs:192
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00042] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess (System.Threading.Tasks.Task task) [0x0001c] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00009] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0
at Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0
at Flurl.Http.HttpResponseMessageExtensions+<ReceiveString>d__3.MoveNext () [0x00000] in C:\projects\flurl\src\Flurl.Http.Shared\Testing\HttpCallAssertion.cs:150
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <abd9ee18f6114b4cae6c0d74712f64b5>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <abd9ee18f6114b4cae6c0d74712f64b5>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <abd9ee18f6114b4cae6c0d74712f64b5>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <abd9ee18f6114b4cae6c0d74712f64b5>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <abd9ee18f6114b4cae6c0d74712f64b5>:0
at PCLTest.APIRepository.APIRepo+<ValidateUrl>d__0.MoveNext () [0x0004f] in C:\D-Drive\branches\PCLTest\APIRepository\APIRepo.cs:20
An unhandled exception occured.