在Xamarin.IOS中使用Office 365 API时出现NullReferenceException [英] NullReferenceException when use Office 365 API in Xamarin.IOS

查看:88
本文介绍了在Xamarin.IOS中使用Office 365 API时出现NullReferenceException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我遇到了这个问题: 在Xamarin.Android中使用Office 365 API

First I got this issue: Using Office 365 API in Xamarin.Android

现在在Xamarin IOS中测试相同,我得到了另一个:(

Now testing the same in Xamarin IOS I got another :(

{System.NullReferenceException: Object reference not set to an instance of an object
  at Microsoft.Office365.OAuth.Authenticator.GetRefreshToken (System.String resource) [0x00000] in <filename unknown>:0 
  at Microsoft.Office365.OAuth.Authenticator+<GetAuthenticationResult>d__c.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[Microsoft.Office365.OAuth.AuthenticationInfo].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Microsoft.Office365.OAuth.Authenticator+<AuthenticateAsync>d__6.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[Microsoft.Office365.OAuth.AuthenticationInfo].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Office365InXamarinApps.ViewModel.ContactsViewModel+<EnsureClientCreated>d__9.MoveNext () [0x00046] in c:\DevApps\GitHub\Office365InXamarinApps\scr\Office365InXamarinApps\Office365InXamarinApps\ViewModel\ContactsViewModel.cs:76 }

代码在这里: https://github.com/saramgsilva/Office365InXamarinApp

推荐答案

Office 365 API预览版存在问题,我无法使用它,因此,我使用Office 365 REST API创建了另一个演示.

The Office 365 API Preview has issues and I cannot use it, for this reason I created another demo using Office 365 REST API.

https://github.com/saramgsilva/Office365RESTAPISample

这篇关于在Xamarin.IOS中使用Office 365 API时出现NullReferenceException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆