我一直在努力让应用程序端点在 UCMA 3.0 上运行。我正在尝试在与 Lync 服务器分开的服务器上运行应用程序,该服务器使用注册的 ApplicationEndpoint 来监视状态并充当可以向其他用户发送消息的机器人。我曾经让我的代码与 UserEndpoint 一起使用(这对于监视状态来说很好),但没有向其他 Lync 用户发送 IM 的功能。
在网上搜索后,我终于在运行代码时遇到此错误:
System.ArgumentException 未处理
Message=仅当指定了代理和多 Tls 时才能注册 ApplicationEndpoint。
来源=Microsoft.Rtc.Collaboration
堆栈跟踪:
在 Microsoft.Rtc.Collaboration.ApplicationEndpoint..ctor(CollaborationPlatform 平台、ApplicationEndpointSettings 设置)
在C:\ Users \ l1m5 \ Desktop \ waldoproject \ trunk \ WaldoSoln \ waldoGrabPresence \ endpointHelper.cs中的Waldo.endpointHelper.CreateApplicationEndpoint(ApplicationEndpointSettings applicationEndpointSettings):第117行
在C:\Users\l1m5\Desktop\waldoproject\trunk\WaldoSoln\waldoGrabPresence\endpointHelper.cs中的Waldo.endpointHelper.CreateEstablishedApplicationEndpoint(字符串endpointFriendlyName):第228行
在C:\Users\l1m5\Desktop\waldoproject\trunk\WaldoSoln\waldoGrabPresence\waldoGrabPresence.cs中的Waldo.waldoGrabPresence.Run()处:第60行
在C:\ Users \ l1m5 \ Desktop \ waldoproject \ trunk \ WaldoSoln \ waldoGrabPresence \ waldoGrabPresence.cs中的Waldo.waldoGrabPresence.Main(String [] args):第42行
在 System.AppDomain._nExecuteAssembly(程序集,String[] args)
在 System.AppDomain.ExecuteAssembly(字符串 assemblyFile,证据 assemblySecurity,字符串 [] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(对象状态)
在 System.Threading.ExecutionContext.Run(ExecutionContextexecutionContext,ContextCallback 回调,对象状态)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException:
经过一番搜索后,我按照此处的说明进行操作: http://blogs.claritycon.com/blogs/michael_greenlee/archive/2009/03/21/installing-a-certificate-for-ucma-v2-0-applications .aspx 将证书导入到我尝试运行应用程序的服务器上,但无济于事。
因此,在这一点上,我认为我设置 ApplicationEndpointSettings、CollaberationPlatform 或 ApplicationEndpoint 对象的方式一定有问题。我是这样做的:
ApplicationEndpointSettings settings = new ApplicationEndpointSettings(_ownerURIPrompt, _serverFQDNPrompt, _trustedPortPrompt);
ServerPlatformSettings settings = new ServerPlatformSettings(null, _serverFQDNPrompt, _trustedPortPrompt, _trustedApplicationGRUU);
_collabPlatform = new CollaborationPlatform(settings);
_applicationEndpoint = new ApplicationEndpoint(_collabPlatform, applicationEndpointSettings);
有人发现我正在做的事情有任何问题吗?或者,更好的是,有人知道有一个博客可以指导您在我所处的情况下建立应用程序端点吗?我非常擅长使用教程或示例,但还没有找到一个似乎可以完成我想要做的事情的方法。
感谢您的帮助!
I've been struggling with getting an application endpoint working on UCMA 3.0. I am trying to run an application on a server separate from the Lync server which uses a registered ApplicationEndpoint to monitor presence and act as a bot which can send other users messages. I used to have my code working with a UserEndpoint (which was fine for monitoring presence), but did not have the capabilities to send IMs to other Lync users.
After searching the web, I'm finally at the point where I'm getting this error when running my code:
System.ArgumentException was unhandled
Message=An ApplicationEndpoint can be registered only if proxy and Multual Tls have been specified.
Source=Microsoft.Rtc.Collaboration
StackTrace:
at Microsoft.Rtc.Collaboration.ApplicationEndpoint..ctor(CollaborationPlatform platform, ApplicationEndpointSettings settings)
at Waldo.endpointHelper.CreateApplicationEndpoint(ApplicationEndpointSettings applicationEndpointSettings) in C:\Users\l1m5\Desktop\waldoproject\trunk\WaldoSoln\waldoGrabPresence\endpointHelper.cs:line 117
at Waldo.endpointHelper.CreateEstablishedApplicationEndpoint(String endpointFriendlyName) in C:\Users\l1m5\Desktop\waldoproject\trunk\WaldoSoln\waldoGrabPresence\endpointHelper.cs:line 228
at Waldo.waldoGrabPresence.Run() in C:\Users\l1m5\Desktop\waldoproject\trunk\WaldoSoln\waldoGrabPresence\waldoGrabPresence.cs:line 60
at Waldo.waldoGrabPresence.Main(String[] args) in C:\Users\l1m5\Desktop\waldoproject\trunk\WaldoSoln\waldoGrabPresence\waldoGrabPresence.cs:line 42
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
After some searching, I followed the instructions here: http://blogs.claritycon.com/blogs/michael_greenlee/archive/2009/03/21/installing-a-certificate-for-ucma-v2-0-applications.aspx to import a certificate onto the server that I'm trying to run the application on, but to no avail.
So at this point, I think that there must be something wrong with how I'm setting up the ApplicationEndpointSettings, CollaberationPlatform or ApplicationEndpoint objects. Here's how I'm doing it:
ApplicationEndpointSettings settings = new ApplicationEndpointSettings(_ownerURIPrompt, _serverFQDNPrompt, _trustedPortPrompt);
ServerPlatformSettings settings = new ServerPlatformSettings(null, _serverFQDNPrompt, _trustedPortPrompt, _trustedApplicationGRUU);
_collabPlatform = new CollaborationPlatform(settings);
_applicationEndpoint = new ApplicationEndpoint(_collabPlatform, applicationEndpointSettings);
Does anyone see any problems with what I'm doing? Or, better yet, does anyone know of a blog that walks you through establishing an application endpoint in the situation I'm in? I work really well with tutorials or samples, but have not found one that seems to accomplish what I'm trying to do.
Thanks for the help!
发布评论
评论(4)
在 Lync 中获取证书的过程与 OCS2007 有很大不同,而且要简单得多。我相信您发布的链接适用于 UCMA2 和 OCS。在 Lync 中,它基本上是两个 powershell 语句。
1) Request-CSCertificate -Action new -Type default -CA -Verbose
2) 保存该语句的结果,获取指纹,将其用作参数:
Set-CsCertificate -Type Default -Thumbprint XXXXXXXXXXXXXXXXXXXX
安装 UCMA 3.0 并创建 Lync Server 池 2010 可信应用程序
The procedure to get a certificate in Lync is very different than OCS2007, and much easier. The link you posted is for UCMA2, and OCS, I believe. In Lync, it's basically two powershell statements.
1) Request-CSCertificate -Action new -Type default -CA -Verbose
2) Save the results of that statement, take the thumbprint, use it as the parameter to:
Set-CsCertificate -Type Default -Thumbprint XXXXXXXXXXXXXXXXXXXX
Installing UCMA 3.0 and Creating a Lync Server 2010 Trusted Application Pool
使用 powershell 来配置受信任的应用程序端点。要探索的命令是新的受信任的应用程序端点。您收到的错误是由于没有注册受信任的端点,即使您可能注册了受信任的应用程序,它也需要一个端点才能工作,并且在配置平台之前必须首先注册该端点。
use powershell to provision a trusted application endpoint. The command to explore is new-trustedapplicationendpoint. The error you are getting is due to no trusted endpoint being registered, even though you may have your trusted application registered, it needs an endpoint to work and that endpoint must be first registered before you provision the platform.
SDK CHM 文件应该是您的朋友! 本部分介绍应用激活和配置
The SDK CHM file should be your friend here! This section is about app activation and provisioning
将证书传递给
ServerPlatformSettings
对象,然后它就可以工作了。我遇到了类似的问题,在使用 ServerPlatformSettings 的 ServerPlatformSettings(string applicationUserAgent, string localhost, int port, string gruu, stringcertificateIssuerName, byte[]certificateSerialNumber) 构造函数后问题得到解决。Pass the certificate to the
ServerPlatformSettings
object, then it works. I had the similar problem, and the problem is resolved after using theServerPlatformSettings(string applicationUserAgent, string localhost, int port, string gruu, string certificateIssuerName, byte[] certificateSerialNumber)
constructor for theServerPlatformSettings
.