OnFindServer事件上的否定状态代码(-2131885978) [英] Negative Status Code (-2131885978) on OnFindServer event

查看:78
本文介绍了OnFindServer事件上的否定状态代码(-2131885978)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用统一通信客户端API,尝试将用户登录到服务器。为了找到我正在使用FindServer方法的服务器。我按照链接中提供的步骤进行了
http://msdn.microsoft.com / en-us / library / bb804175(v = office.12).aspx  直到
才能获得服务器列表。

I am working with Unified Communication Client API, where am trying to sign in users into a server. In order to find the server I am using FindServer method. I followed the steps provided in the link http://msdn.microsoft.com/en-us/library/bb804175(v=office.12).aspx till the point of just obtaining server list.

在回调方法OnFindServer中我得到了一个N​​EGATIVE状态代码值(-2131885978)的  这代表
错误代码:80EE0066 ;错误说明: UCC_E_SIP_DNS_FAIL

in the call back method OnFindServer I am getting a NEGATIVE status code value (-2131885978).  This represents Error Code : 80EE0066 ; Error Description : UCC_E_SIP_DNS_FAIL

我无法弄清楚我哪里出错。可以有人帮助我。

   

以下是用于相同的代码:

 

        //初始化平台

         public void InitializePlatform()

        {

            //建议事件参数所需的变量声明

            int cookie;

        //Initializing the platform
         public void InitializePlatform()
        {
            // Variable declaration required for Advicing events parameter
            int cookie;

            //初始化登录过程所需的平台

            platform = new UccPlatform();

            // Initialize the platform required for the sign in process
            platform = new UccPlatform();

            //对指定平台上所有平台活动的建议

            Utilities.Advise< _IUccPlatformEvents>(平台,NULL,退出cookie);

            // Advice for all the platform events on the specified platform
            Utilities.Advise<_IUccPlatformEvents>(platform, null, out cookie);

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; UccContext ctxt = new UccContextClass();

            ctxt.AddNamedProperty(QUOT;平台名称"," sampleUCCPClient");

            UccContext ctxt = new UccContextClass();
            ctxt.AddNamedProperty("Platform Name", "sampleUCCPClient");

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; //使用任何名称初始化平台,特别是应用程序名称为
            platform.Initialize(" OCSTestApp",ctxt);

        }

            // Initialize a platform with any name, specifically application name
            platform.Initialize("OCSTestApp", ctxt);
        }



         ///< summary>

        ///获取服务器列表

        ///< / summary>

        ///< param name =" ocsUser">< / param>

        private void GetServerList(OCSUser ocsUser)

        {

            ServerConfiguration confObj = ServerConfiguration.Instance;


         /// <summary>
        /// To obtain list of Servers
        /// </summary>
        /// <param name="ocsUser"></param>
        private void GetServerList(OCSUser ocsUser)
        {
            ServerConfiguration confObj = ServerConfiguration.Instance;

            //建议事件参数所需的变量声明

            int cookie;

            IUccEndpoint端点;

            // Variable declaration required for Advicing events parameter
            int cookie;
            IUccEndpoint endpoint;

            //创建sip端点并建议端点事件

            UccUriManager uriManager = new UccUriManagerClass();

            UccUri meUri = uriManager.ParseUri(ocsUser.OcsUserUri);

            // Create the sip endpoint and advise for endpoint events
            UccUriManager uriManager = new UccUriManagerClass();
            UccUri meUri = uriManager.ParseUri(ocsUser.OcsUserUri);

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; // UccContext endpointContext =新UccContext();

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; //endpointContext.AddProperty((int)UCC_SERVER_ENDPOINT_FLAGS.UCCSEF_DISABLE_STRICT_DNS, (对象)Boolean.TrueString);

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;端点= platform.CreateEndpoint(UCC_ENDPOINT_TYPE.UCCET_PRINCIPAL_SERVER_BASED,meUri,NULL,NULL);

            //UccContext endpointContext = new UccContext();
            //endpointContext.AddProperty((int)UCC_SERVER_ENDPOINT_FLAGS.UCCSEF_DISABLE_STRICT_DNS,  (object)Boolean.TrueString);
            endpoint = platform.CreateEndpoint(UCC_ENDPOINT_TYPE.UCCET_PRINCIPAL_SERVER_BASED, meUri, null, null);

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; // UccOperationContext operationContextObj = new UccOperationContext();

            //operationContextObj.Initialize(0,endpointContext);

            //UccOperationContext operationContextObj = new UccOperationContext();
            //operationContextObj.Initialize(0, endpointContext);

            //注册终点事件

            int cookie2;

            Utilities.Advise< _IUccEndpointEvents>(端点,由此,出COOKIE2);

            // Registration for the End Point Events
            int cookie2;
            Utilities.Advise<_IUccEndpointEvents>(endpoint, this, out cookie2);

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; //来自端点的QI IUccServerSignalingSettings并配置服务器设置

            IUccServerSignalingSettings serverSignalingSettings =(IUccServerSignalingSettings)端点;

            // QI IUccServerSignalingSettings from the endpoint and configure server settings
            IUccServerSignalingSettings serverSignalingSettings = (IUccServerSignalingSettings)endpoint;

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; if(serverSignalingSettings!= null)

            {

                //建议服务器信令设置事件。

                int cookie3;

                Utilities.Advise< _IUccServerSignalingSettingsEvents>(端点,由此,出cookie3);

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;   serverSignalingSettings.FindServer(confObj.OcsDomain,null);

            } 

            if (serverSignalingSettings != null)
            {
                // Advise for server signaling settings events.
                int cookie3;
                Utilities.Advise<_IUccServerSignalingSettingsEvents>(endpoint,this,out cookie3);
                serverSignalingSettings.FindServer(confObj.OcsDomain, null);
            } 

 

 

提前致谢

Annie

 

推荐答案

FindServer处理取决于能否为服务器执行DNS查找。 如果您没有为OCS / Lync服务器配置DNS条目,或者您的客户端计算机无法连接到DNS,则FindServer将无法找到它们。

The FindServer processing depends on being able to do a DNS lookup for the server.  If you did not configure the DNS entries for your OCS/Lync server, or your client machine can not connect to DNS, then the FindServer will not be able to locate them.

这是一个链接到为OCS定义所需DNS条目的过程:  为您的服务器或池创建和验证DNS记录

Here is a link to the procedure for defining the required DNS entries for OCS: Create and Verify DNS Records for Your Server or Pool


这篇关于OnFindServer事件上的否定状态代码(-2131885978)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆