【问题标题】:Testing UCMA application on a local machine在本地机器上测试 UCMA 应用程序
【发布时间】:2016-08-22 13:05:03
【问题描述】:

我正在研究使用 UCMA 5.0 的解决方案。我希望能够在本地测试我的解决方案,但是当我查看文档时,似乎我需要将我的解决方案部署到所谓的“受信任的服务器”。我想在本地测试所有内容,并避免将文件复制到远程服务器(并在那里测试)。有什么提示吗?

【问题讨论】:

    标签: ucma skype-for-business


    【解决方案1】:

    UCMA 应用程序主要有两种类型:

    客户端应用程序只能创建UserEndpoint,并且它必须提供所有的身份验证信息(即用户密码)。如果这就是您所需要的,那么您可以在任何地方运行它而无需任何设置。

    服务器应用程序涉及更多,因为应用程序和运行它的计算机受到 Lync 的“信任”。您可以使用ApplicationEndpoint's 或UserEndpoint's,它们比普通端点更强大(不需要密码和更多功能)。如果这是您需要的,那么您需要设置您的机器以能够运行服务器 UCMA 应用程序。

    服务器应用程序有两种主要类型:

    手动配置需要更多编码,因为您需要预先了解自己在 Lync 中创建的所有内容。

    自动配置需要较少的编码,但机器设置很多。

    我建议始终使用手动配置,因为我认为自动配置的机器设置很疯狂...

    所以要在你自己的机器上运行,你需要:

    • 设置机器运行UCMA server application。我会推荐一个单一的实例池。
    • 为您的计算机创建一个证书(通常网络服务器会这样做)。阅读上面的链接,证书设置一直是客户解决问题的首要问题,因此请仔细阅读上面的链接。
    • 如果您疯了,请将您的机器设置为 store replication point 以进行自动配置。

    将您的计算机设置为应用程序池后,您可以根据需要使用New-CsTrustedApplicationNew-CsTrustedApplicationEndpoint 创建受信任的应用程序和受信任的应用程序端点。

    我会非常习惯使用 lync powershell 命令,因为它非常有用。

    顺便说一句,我还推荐 UCMA v4.0 而不是 v5.0。 v4 应用程序在 Skype for Business 和 Lync 2013 上运行良好。此外,如果您使用 UCMA 4.0,您可以安装 Lync 2013 ocscore.msi(附带 UCMA 4.0 运行时)并允许您自己运行 Lync powershell 命令机器(针对 S4B 和 Lync 2013)。我还没有弄清楚如何在不破坏任何东西的情况下在 UCMA 5.0 上做到这一点......

    4.0 和 5.0 之间没有 API 差异,因此它们之间的切换非常简单。

    【讨论】:

      【解决方案2】:

      UserEndpoint 方法简单易行。

      我在这里粘贴一些代码供参考。有了这个,您可以开始初始化 UserEndpoint。

      using Microsoft.Rtc.Collaboration;
      using Microsoft.Rtc.Signaling;
      
      
          private static string fqdn = ConfigurationManager.AppSettings["ServerFQDN"];
          private static string sipaddress = ConfigurationManager.AppSettings["UserURI"];
          private static string username = ConfigurationManager.AppSettings["UserName"];
          private static string password = ConfigurationManager.AppSettings["UserPwd"];
          private static string domain = ConfigurationManager.AppSettings["UserDomain"];
      
      CollaborationPlatform _platform;
      UserEndpoint _endpoint; 
      
      var platformSettings = new ClientPlatformSettings(userAgent, SipTransportType.Tls);
      _platform = new CollaborationPlatform(platformSettings);
      
              UserEndpointSettings settings = new UserEndpointSettings(sipaddress,fqdn);
              settings.Credential = new System.Net.NetworkCredential(username, password, domain);
              settings.AutomaticPresencePublicationEnabled = true;
      
              _endpoint = new UserEndpoint(_platform, settings);
      
              try
              {
                  await _platform.BeginStartup();
                  await _endpoint.BeginEstablish();
      
                  _endpoint.RegisterForIncomingCall<InstantMessagingCall>(
                      OnIncomingInstantMessagingCallReceived);
              }
      

      【讨论】:

        猜你喜欢
        • 2012-06-28
        • 1970-01-01
        • 2012-03-24
        • 1970-01-01
        • 2019-07-17
        • 2020-02-09
        • 1970-01-01
        • 2012-11-26
        • 2018-10-13
        相关资源
        最近更新 更多