为什么Office 365的OutlookServices(v1.0.34).NET客户端库无限期挂起? [英] Why does the Office 365 OutlookServices (v1.0.34) .Net client library hang indefinitely?

查看:147
本文介绍了为什么Office 365的OutlookServices(v1.0.34).NET客户端库无限期挂起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了 Microsoft.Office365.OutlookServices 客户端库,以在Windows应用程序基于Outlook的服务(电子邮件,日历,联系人等)调用,一个Windows Phone应用程序,以及一个ASP.NET Web应用程序。到所有来电ExecuteAsync()挂无限期,无引发的错误。为什么会出现这种情况?

I’m using the Microsoft.Office365.OutlookServices client library to make calls to Outlook-based services (email, calendar, contacts, etc.) in a Windows app, a Windows Phone app, and an ASP.NET web app. All calls to ExecuteAsync() hang indefinitely, with no errors thrown. Why is this happening?

下面是一个Windows Phone应用程序,我最近从v.1.0.22升级为 Microsoft.Office365.OutlookServices 客户端库的1.0.34为例

Here is an example from a Windows Phone app which I've recently upgraded from v.1.0.22 to 1.0.34 of the Microsoft.Office365.OutlookServices client library:

我让我的Outlook客户端:

I get my Outlook client:

DiscoveryClient discoveryClient = new DiscoveryClient(
    async () => await GetTokenHelperAsync(_authenticationContext, DiscoveryResourceId));

// Get the specified capability ("Mail").
CapabilityDiscoveryResult result =
    await discoveryClient.DiscoverCapabilityAsync(capability);

outlookClient = new OutlookServicesClient(
    result.ServiceEndpointUri,
    async () => await GetTokenHelperAsync(_authenticationContext, result.ServiceResourceId));

然后我尝试用它发送电子邮件(不包括code,对于简洁起见创建了消息):

Then I try to send an e-mail message with it (not including the code that creates the message for the sake of brevity):

await outlookClient.Me.SendMailAsync(draft, true);

当我在模拟器中运行应用程序,应用程序挂在上述行。不会引发任何错误。

When I run the app in the emulator, the app hangs at the above line. No errors are thrown.

推荐答案

哪个Microsoft.Office365.OutlookServices库版本您使用的?如果你正在使用的版本1.0.34,您可能需要更新Microsoft.OData.ProxyExtensions大会,与该版的 OutlookServices的NuGet包。看看你的packages.config文件。如果你有Microsoft.OData.ProxyExtensions装配的1.0.30版本,那是你的问题的根源。您可以通过安装 Microsoft.OData.ProxyExtensions库

Which version of the Microsoft.Office365.OutlookServices library are you using? If you’re using the version 1.0.34, you might need to update the Microsoft.OData.ProxyExtensions assembly that installs with that version of the OutlookServices NuGet package. Look at your packages.config file. If you have version 1.0.30 of the Microsoft.OData.ProxyExtensions assembly, then that is the source of your problem. You can fix this by installing version 1.0.35 of the Microsoft.OData.ProxyExtensions library.

这篇关于为什么Office 365的OutlookServices(v1.0.34).NET客户端库无限期挂起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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