【问题标题】:Can I use a Lync api in my asp.net application?我可以在我的 asp.net 应用程序中使用 Lync api 吗?
【发布时间】:2013-05-08 08:48:03
【问题描述】:

嗨,我可以使用 C# 在列表视图中获取 lync 联系人及其状态吗?我想让所有用户从广告到 asp.net Web 应用程序中的列表视图,并控制用户在线或离线。

【问题讨论】:

  • 你有没有尝试过任何东西......你有没有通过 lync api MSDN 和其他可用的博客......先做一些研发和编码然后再来
  • 到目前为止你做了哪些研究?你有没有尝试过?
  • 我搜索了如何做到这一点,但我没有找到任何可以帮助我的想法

标签: c# asp.net listview status lync-2010


【解决方案1】:

如果 Carlos 的链接确实失效了,这里是 TL;DR。此 Javascript 使用 C:\Program Files\MicrosoftOffice\Office14 中的 NAME.dll:

<script>
  $(function() {
    //hide the ooui if the user scrolls.
    (window).scroll(function() {
      HideOOUI();
    });

    $('#lyncspan').hover(function() {
        //show ooui on mouseover event
        ShowOOUI();

    }, function() {
        //hide ooui on mouseout event
        HideOOUI();

    });
  });

  var sipUri = "your.contact@your.domain.com";
  var nameCtrl = new ActiveXObject('Name.NameCtrl.1');

  if (nameCtrl.PresenceEnabled)
  {
    nameCtrl.OnStatusChange = onStatusChange;
    nameCtrl.GetStatus(sipUri, "lyncspan");
  }

  function onStatusChange(name, status, id)
  {
    //In a real world application you would display
    //a status icon instead of an alert
    alert(name + ", " + status + ", " + id);
  }

  function ShowOOUI()
  {
    nameCtrl.ShowOOUI(sipUri, 0, 15, 15);
  }

  function HideOOUI()
  {
    nameCtrl.HideOOUI();
  }

</script>
<span id="lyncspan" style="border-style: solid">Your Contact<span>

【讨论】:

    【解决方案2】:

    是的,你可以。检查以下链接以将 lync 集成到 asp.net 应用程序中:

    Lync 集成:

    http://sharpsplash.wordpress.com/2012/08/03/integrate-microsoft-lync-into-a-asp-net-web-application/

    显示 MS Lync 在线状态:

    http://htmlpresencecontrols.codeplex.com/

    【讨论】:

    • 这应该是注释,因为链接死了就没用了。
    猜你喜欢
    • 1970-01-01
    • 2013-07-15
    • 2015-03-20
    • 1970-01-01
    • 2011-02-18
    • 1970-01-01
    • 2012-12-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多