使用 PresenceIndicator 的 Lync API 在 InitializationCompleted 中输出 TypeInitializationException
我在 WPF 应用程序中使用 Lync API。我使用了培训套件中的 Office365 Lync Lab 9.1。但是,当我将代码移至 WPF 应用程序中时,PresenceIndicator 或 ContactList 不起作用。显示控件,但不显示 Lync 用户的状态。我使用的帐户与 Office365 Training Lab 9.1 中使用的帐户完全相同。
当我添加日志记录时,我会显示类似于以下 PresenceIndicator 的错误:
Applying template...
Control 'PresenceIndicator' entering 'OnLoaded'
UCClientInitializationFailed:Failed to Create Provider. Error Type: TypeInitializationException
我也在尝试 ContactList 并且正在输出:
UCClientInitializationFailed:Failed to Create Provider. Error Type: TypeInitializationException
此外,InitializationCompleted 事件中的 InitializationError 属性也显示未知错误。我该如何进一步解决这个问题?
I am using the Lync API within a WPF application. I have used the Office365 Lync Lab 9.1 within the training kit. However when I move the code into my WPF application the PresenceIndicator or ContactList doesn't work. The controls are displayed however the status of the Lync user is not shown. I am using the exact same accounts that are working within the Office365 Training Lab 9.1.
When I add logging I am shown errors like the following for the PresenceIndicator:
Applying template...
Control 'PresenceIndicator' entering 'OnLoaded'
UCClientInitializationFailed:Failed to Create Provider. Error Type: TypeInitializationException
I am also trying the ContactList and that is outputting:
UCClientInitializationFailed:Failed to Create Provider. Error Type: TypeInitializationException
Also the InitializationError property within the InitializationCompleted event is showing an Unknown error. How would I troubleshoot this issue further?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这完全是在黑暗中进行的尝试,但您是否正在尝试向以前从未与 Lync 集成的现有 WPF 应用程序添加控件?
您的应用程序中可能缺少引用 - 请仔细检查 %program files%\Microsoft Lync\SDK\Assemblies\Desktop
另外值得检查的是:
如果这没有帮助,您可以尝试使用 Visual Studio 中的“Lync WPF 应用程序”模板创建新的 WPF 应用程序。如果工作正常,则将其与您的应用程序进行比较,以了解引用、配置等方面的任何差异。
此 MSDN 页面可能有用。
This is a complete stab in the dark, but are you attempting to add controls to an existing WPF application that has never integrated with Lync before?
It may be that you are missing references in your app - double-check you have references to the following files in %program files%\Microsoft Lync\SDK\Assemblies\Desktop
Also worth checking:
If that doesn't help, you could try creating a new WPF application using the "Lync WPF Application" template in Visual Studio. If this works correctly, then compare this against your appplication for any differences in references, configuration etc.
This MSDN page may be useful.