【问题标题】:Launch Office Communicator from asp.net从 asp.net 启动 Office Communicator
【发布时间】:2011-10-14 09:21:43
【问题描述】:

在我正在构建的 Intranet 上,需要有即时消息传递。客户已经在使用 Office Communicator 应用程序,所以我想尽可能使用它。

Intranet 将有一个员工目录,我希望每个员工旁边都有一个“呼叫”按钮,它将启动 Communicator 应用程序。我不知道客户端是否有 Communicator Web Access 组件,我们可能根本无法安装它。我应该如何进行这种集成?

【问题讨论】:

    标签: asp.net integration instant-messaging office-communicator


    【解决方案1】:

    应该不需要安装 Web Access。您可以使用现有的NameCtrl 角色菜单在客户端执行所有操作 - 这是在将鼠标悬停在用户状态图标上时显示在 SharePoint(和其他基于 Web 的应用程序,如 Dynamics CRM)中的弹出菜单。此菜单允许您呼叫用户、开始新对话等。您需要在正在运行的计算机上安装 Office 才能使其工作。

    例如,在任何运行 Office 2007/2010 和 IE 的客户端计算机上尝试此操作。将鼠标悬停在“您的联系人”文本上以查看角色菜单(您的站点需要添加到受信任的站点或 Intranet 区域):

    <script>
    
    var sipUri = "your.contact@your.domain.com";
    
    var nameCtrl = new ActiveXObject('Name.NameCtrl.1');
    if (nameCtrl.PresenceEnabled)
    {
      nameCtrl.OnStatusChange = onStatusChange;
      nameCtrl.GetStatus(sipUri, "1");
    }
    
    
    function onStatusChange(name, status, id)
    {
      // This function is fired when the contacts presence status changes.
      // In a real world solution, you would want to update an image to reflect the users presence
      alert(name + ", " + status + ", " + id);
    }
    
    function ShowOOUI()
    {
      nameCtrl.ShowOOUI(sipUri, 0, 15, 15);
    }
    
    function HideOOUI()
    {
      nameCtrl.HideOOUI();
    }
    
    </script>
    
    <span onmouseover="ShowOOUI()" onmouseout="HideOOUI()" style="border-style:solid">Your Contact</span>
    

    【讨论】:

      【解决方案2】:

      基于服务器的 Web 应用程序不适合启动客户端可执行文件。可能有一些使用 ActiveX 控件的方法,但在 IE 本身中必须显式启用。

      【讨论】:

        【解决方案3】:

        在这种情况下,您可能必须使用 Microsoft Office Communicator Server 为需要扩展功能和协作工具的组织提供的 UCM API(统一通信托管 API)。有一套用于 ASP.NET Web 应用程序的工具,请看:http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23780 并提供示例

        【讨论】:

          猜你喜欢
          • 2012-06-18
          • 1970-01-01
          • 1970-01-01
          • 2014-01-12
          • 1970-01-01
          • 1970-01-01
          • 2013-03-05
          • 2014-12-04
          • 1970-01-01
          相关资源
          最近更新 更多