Can not get device list info by calling MIP SDK interface when add two Recording Server into Management Client

Hikvision Plugin call MIP SDK to get deivce list, ususally it works when we add device into Management Client. But we face issue when add two Recording Server into Management Client. MIP SDK do not response device list. Here is our source code which also refer to your demo. Can you help check? Thanks.

        private static void fnFillDeviceListConfigAPI(List<HikDeviceSDKInfo> lstDeviceInfo)
        {
            string serverAddress = EnvironmentManager.Instance.MasterSite.ServerId.ServerHostname;
            int serverPort = EnvironmentManager.Instance.MasterSite.ServerId.Serverport;
            bool corporate = EnvironmentManager.Instance.MasterSite.ServerId.ServerType == ServerId.CorporateManagementServerType;
 
            ConfigApiClient _configApiClient = new ConfigApiClient();
            _configApiClient.ServerAddress = serverAddress;
            _configApiClient.Serverport = serverPort;
            _configApiClient.ServerType = corporate
                                              ? ConfigApiClient.ServerTypeEnum.Corporate
                                              : ConfigApiClient.ServerTypeEnum.Arcus;
 
            _configApiClient.Initialize();
 
            if (!_configApiClient.Connected)
            {
                LogHelper.WriteLog(typeof(MipDriverExchange), "_configApiClient.Connected fail");
            }
 
 
            foreach (var childItem in _configApiClient.GetChildItems("/"))
            {
                AddChildren(_configApiClient, childItem, lstDeviceInfo);
            }
        }
 
 
       private static void AddChildren(ConfigApiClient _configApiClient, ConfigurationItem item, List<HikDeviceSDKInfo> lstDeviceInfo)
        {
            bool expandTree = _navItemTypes.Contains(item.ItemType);
            if (expandTree)
            {
                try
                {
                    var childs = _configApiClient.GetChildItems(item.Path);
                    if (childs != null)
                    {
                        
                        foreach (var childItem in childs)
                        {
                            if (childItem.ItemType == ItemTypes.HardwareDriverSettingsFolder ||
                                childItem.ItemType == ItemTypes.DeviceDriverSettingsFolder ||
                                childItem.ItemType == ItemTypes.PtzPresetFolder ||
                                childItem.ItemType == ItemTypes.StreamFolder ||
                                childItem.ItemType == ItemTypes.MotionDetectionFolder ||
                                childItem.ItemType == ItemTypes.PrivacyMaskFolder
                                )
                                continue;
                            if (childItem.ItemType.EndsWith("Folder"))
                            {
                                if (childItem.ItemType != ItemTypes.HardwareDriverFolder)
                                    AddChildren(_configApiClient, childItem, lstDeviceInfo);
                            }
                            else
                            {
                                if(childItem.ItemType == ItemTypes.Hardware)
                                {
                                    bool bHik = false;
                                    HikDeviceSDKInfo hikDeviceInfo = new HikDeviceSDKInfo();
                                    if (childItem.Properties != null)
                                    {
                                        foreach (Property key in childItem.Properties)
                                        {
                                            if (key.Key.Equals("Address"))
                                            {
                                                string szIP = key.Value;
                                                if (szIP.IndexOf("http") == -1)
                                                {
                                                    szIP = "http://" + szIP;
                                                }
                                                Uri uri = new Uri(szIP);
                                                hikDeviceInfo.m_iPort = uri.Port;
                                                hikDeviceInfo.m_szIP = uri.Host;
                                            }
                                            if (key.Key.Equals("UserName"))
                                            {
                                                string szUserName = key.Value;
                                                hikDeviceInfo.m_szUserName = szUserName;
                                            }
                                            if(key.Key.Equals("Id"))
                                            {
                                                hikDeviceInfo.m_iID = key.Value;
                                            }
                                            if (key.Key.Equals("Name"))
                                            {
                                                hikDeviceInfo.m_DeviceName = key.Value;
                                            }
 
                                            if (key.Key.Equals("Model"))
                                            {                                                
                                                string szProductId = key.Value.ToLower();
                                                if (szProductId.IndexOf("hik") != -1 || szProductId.IndexOf("ds-") != -1)  
                                                {
                                                    bHik = true;
                                                }
                                            }
 
                                        }
                                    }
 
                                                               AddDevicePassword(_configApiClient, childItem, hikDeviceInfo);
 
                                                                AddChannelInfo(_configApiClient, childItem, hikDeviceInfo);
                                    if (bHik)
                                    {
                                        lstDeviceInfo.Add(hikDeviceInfo);
                                    }
                                }
 
                                if (childItem.ItemType != ItemTypes.HardwareDriverFolder)
                                    AddChildren(_configApiClient, childItem, lstDeviceInfo);
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    LogHelper.WriteLog(typeof(MipDriverExchange), ex.ToString());
                }
            }
        }

If you run the Config API Client sample you will see the full “tree” you are navigating.

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/configapiclient/readme.html&tree=tree_2.html

Please try to run the sample that you will see what I mean in the site that you are working on.

A guess on my part is that your code is not iterating through multiple RecordingServer nodes.

I am guessing without going deep into your code, if my answer does not lead to a solution directly, please try to tell what you observe testing my guess.