-1
HttpResponseMessage response = 
    client.GetAsync("api/MOB_Vw_UsersAPI/GetMOB_Vw_Users?Uname=" + 
       uname + "&Pass=" + pass).Result;

When I run this part of code on Windows Phone emulator things going well and it works fine. However, when I run it on an Android emulator it gives me this strange error:

System.AggregateException one or more errors occurred.

1
  • 1
    An AggregateException is a bundle of Exceptions. Look at the InnerException to get more detail. Commented Sep 18, 2016 at 12:51

1 Answer 1

2

What you are seeing here is an AggregateException, which means that the async method you are calling synchronously with .Result (which is bad) is failing internally for some reason.

Checking the InnerException(s), would reveal why the error occurs.

Please stop calling async methods synchronously or you are going to encounter bad issues and you will lock up your UI and potentially deadlock your application making it unresponsive.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.