尝试从 Office Communicator 2007 获取状态时出现 COM 异常

发布于 2024-09-26 07:16:39 字数 5317 浏览 10 评论 0原文

我正在一个使用运行 IIS 7 的 Windows Server Standard 设置的新机器上构建概念验证。

我需要做的任务是获取登录用户并使用 Office Communicator 2007 检查是否存在(以及存在类型)同一台机器上的交换盒上的其他用户的在线、离线、离开、忙碌等)。

代码看起来非常简单:

public string GetStatus(string username)
    {
        try
        {
            if(this.CurrentCommunicator == null)
                this.CurrentCommunicator = new CommunicatorAPI.MessengerClass();

            this.CurrentCommunicator.Signin(0, "********", "*****");

            if (CurrentCommunicator != null)
            {
                foreach (IMessengerContact contact in CurrentCommunicator.MyContacts as IMessengerContacts)
                {
                    if (!contact.IsSelf)
                        if (contact.SigninName.Contains(username))
                        {
                            MISTATUS status = contact.Status;
                            return GetStatusString(status);
                        }
                }
            }
        }
        catch (Exception ex)
        {
            return ex.Message;
        }
        return "Unknown";
    }

我使用正确的 u/p 登录到 Office Communicator 2007,以便 OCS 实例化,但是当代码尝试循环联系人时:

foreach (IMessengerContact contact in CurrentCommunicator.MyContacts as IMessengerContacts)

它会抛出此错误:

检索具有 CLSID {8885370D 的​​组件的 COM 类工厂-B33E-44B7-875D-28E403CF9270} 由于以下错误而失败:80070005。

Chris Crowe 的博客 似乎提供了一条前进的道路,但在更改了“Office Communicator Messenger Class”的启动和激活权限之后,“网络” Service' 具有本地启动激活权限 - 抛出的 COM 错误没有变化。

我还尝试给予“所有人”启动和激活权限而不进行任何更改。


我读了很多 OCS 文章,但似乎无法解决这个问题。在我拧出更多的头发之前请帮忙。

如何编写自己的 C# 程序用于登录 Office Communicator http://www.mombu.com/microsoft/live-communications-server-developer/t-how-i-can-write-my-own-c- program-for-login-in-office-comunicator-927275.html

如何使用 Office Communicator sdk 获取状态 http://blogs.msdn.com/b/cmayo/archive/2009/09/21/how-to-get-presence-using-office-communicator-sdk.aspx

Office Communicator 自动化 API 2分钟后 http://blogs.msdn.com/b/cmayo/archive/2009/01/08/the-office-communicator-automation-api-in-2-min.aspx

使用 Office Communicator Automation应用程序编程接口 http:// blogs.msdn.com/b/midunn/archive/2008/03/09/using-the-communicator-automation-api.aspx

在 Office Communicator 中构建自定义联系人列表 http://msdn.microsoft.com/en -us/library/bb758709(v=office.12).aspx

Office Communicator 状态如何工作? Office Communicator 在线状态如何工作?

检测用户在线状态 检测用户状态

OWA 2010 表单身份验证的配置信息 http://www.stone-ware.com/cloud/ support/3rdPartyDetails.jsp?id=216

Office Communicator Automation API 使用入门 http://msdn.microsoft.com/en-us /library/bb758820(office.12).aspx

用于 .NET Framework 应用程序的 Office Communicator 2007 开发环境 http://msdn.microsoft.com/en -us/library/bb787231(v=office.12).aspx

当您更改 Office Communications Server 2007 服务帐户的密码时,事件查看器中会记录事件 ID 56013(错误代码为 80070005) http://support.microsoft.com/kb/953112/en-us

通过更改“启动和激活”权限修复 Office COM 80070005 错误 http://blog.crowe.co.nz/archive/ 2006/03/02/589.aspx

登录 Communicator (Office Communicator 2007) http:// office.microsoft.com/en-gb/communicator-help/sign-in-to-communicator-HA010206469.aspx?redir=0

自动登录 OCS API 示例 http://social. msdn.microsoft.com/Forums/en-US/ucclientsdk/thread/bc0ba921-7cc5-4098-b137-ffb85d667e58

Office 2007 - 接口成员调用 http://msdn.microsoft.com/en -us/library/bb758725(v=office.12).aspx

I am building a proof of concept on a new box that has been set up with Windows Server Standard running IIS 7.

The task I need to do is take the logged in user and using Office Communicator 2007 check for the presence (and type of presence, online, offline, away, busy etc) of other users on the exchange box on the same machine.

The code seems pretty simple:

public string GetStatus(string username)
    {
        try
        {
            if(this.CurrentCommunicator == null)
                this.CurrentCommunicator = new CommunicatorAPI.MessengerClass();

            this.CurrentCommunicator.Signin(0, "********", "*****");

            if (CurrentCommunicator != null)
            {
                foreach (IMessengerContact contact in CurrentCommunicator.MyContacts as IMessengerContacts)
                {
                    if (!contact.IsSelf)
                        if (contact.SigninName.Contains(username))
                        {
                            MISTATUS status = contact.Status;
                            return GetStatusString(status);
                        }
                }
            }
        }
        catch (Exception ex)
        {
            return ex.Message;
        }
        return "Unknown";
    }

I am logged into Office Communicator 2007 with the correct u/p so OCS instantiates, but when the code attempts to loop round the Contacts:

foreach (IMessengerContact contact in CurrentCommunicator.MyContacts as IMessengerContacts)

it throws this error:

Retrieving the COM class factory for component with CLSID {8885370D-B33E-44B7-875D-28E403CF9270} failed due to the following error: 80070005.

Chris Crowe's blog seemed to offer a way forward but after changing the launch and activation permissions of 'Office Communicator Messenger Class' so that 'Network Service' had local launch activation rights - there was no change in the COM error that was being thrown.

I've also tried giving 'Everyone' launch and activation permissions with no change.


I've read through a slew of OCS articles, but I can't seem to solve this problem. Please help before I wrench out more clumps of hair.

How can I write my own C# program for login in Office Communicator
http://www.mombu.com/microsoft/live-communications-server-developer/t-how-i-can-write-my-own-c-program-for-login-in-office-comunicator-927275.html

How to get presence using office communicator sdk
http://blogs.msdn.com/b/cmayo/archive/2009/09/21/how-to-get-presence-using-office-communicator-sdk.aspx

The Office Communicator Automation API in 2 minutes
http://blogs.msdn.com/b/cmayo/archive/2009/01/08/the-office-communicator-automation-api-in-2-min.aspx

Using the Office Communicator Automation API
http://blogs.msdn.com/b/midunn/archive/2008/03/09/using-the-communicator-automation-api.aspx

Building a custom contact list in Office Communicator
http://msdn.microsoft.com/en-us/library/bb758709(v=office.12).aspx

How Does the Office Communicator Presence Status Work?
How Does the Office Communicator Presence Status Work?

Detecting user presence
Detecting user presence

Configuration Information for OWA 2010 Form Authentication
http://www.stone-ware.com/cloud/support/3rdPartyDetails.jsp?id=216

Getting Started Using Office Communicator Automation API
http://msdn.microsoft.com/en-us/library/bb758820(office.12).aspx

Office Communicator 2007 Development Environments For .NET Framework Applications
http://msdn.microsoft.com/en-us/library/bb787231(v=office.12).aspx

Event ID 56013 with an error code of 80070005 is logged in Event Viewer when you change the password for Office Communications Server 2007 service accounts
http://support.microsoft.com/kb/953112/en-us

Fixing Office COM 80070005 errors by changing 'Launch and Activation' permissions
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx

Sign into Communicator (Office Communicator 2007)
http://office.microsoft.com/en-gb/communicator-help/sign-in-to-communicator-HA010206469.aspx?redir=0

AutoLogin into OCS API example
http://social.msdn.microsoft.com/Forums/en-US/ucclientsdk/thread/bc0ba921-7cc5-4098-b137-ffb85d667e58

Office 2007 - Interface Member Invocations
http://msdn.microsoft.com/en-us/library/bb758725(v=office.12).aspx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文