【发布时间】:2017-06-23 23:08:30
【问题描述】:
我正在开发一个 Xamarin.Forms 项目,但遇到了一个非常奇怪的问题。这段代码实际上是在 Xamarin.Droid 项目中执行的。
当我尝试这样做时
var user = await client.LoginAsync(this, MobileServiceAuthenticationProvider.Facebook);
if (user != null)
{
try
{
// executes this line
var userInfo = await client.InvokeApiAsync("/.auth/me");
// down here nothing is executed and userInfo is never set with the data
}
catch (Exception e)
{
// never enter to this block
}
}
userInfo 变量永远不会与数据一起设置,并且在输出中没有异常和罕见的情况。
我已经尝试过 client.InvokeApiAsync("/.auth/me", HttpMethod.Get, null) 但也没有用。
我知道这是很短的信息,但我没有其他任何信息,因为没有引发异常。
谢谢。
【问题讨论】:
标签: xamarin xamarin.forms azure-mobile-services