Cannot retrieve camera list belonging to federated site?

Dear Sir/Madam,

Following code in my application is used to retrieve the camera list from milestone corporate 2016 R3. But I found it cannot get the camera list belonging to federated site. Would you please give me some suggestion? Thank you.

Regards,

ZhangWei

    public static List<Item> FindAllCameras(List<Item> top)

    {

        List<Item> allCameras = new List<Item>();

        if (top != null)

            foreach (Item item in top)

            {

                if (item.FQID.FolderType == [FolderType.No](https://FolderType.No) && item.FQID.Kind == Kind.Camera)

                    allCameras.Add(item);

                if (item.FQID.FolderType != [FolderType.No](https://FolderType.No))

                {

                    List<Item> check = FindAllCameras(item.GetChildren());

                    if (check != null && check.Count > 0)

                        allCameras.AddRange(check);

                }

            }

        return allCameras;

    }

When you have federated sites you need to login on each site. Please explore the MultisiteViewer sample.

Hi Bo, Thank you very much. My application and plugin need to control milestone smart client to popup a floating window and display specified camera live video. Is there any problem if try to view camera belonging to child site? is there any difference for SDK to control cameras belonging to child site? Sorry I cannot test it because it is failed to set federated architecture in my development environment only having two workstation with no domain server.

When you are implementing a Smart Client plugin the situation is a bit different. The Smart Client will automatically log in on each site and you will have the whole configuration, you will be able to see the same cameras as the user can use in the Smart Client.

I would guess that you would get all cameras by your recursive function.

It should be easy to test but would require a second test server.

If your testing show that all cameras can be used in the Smart Client but does not put all cameras into the list I am not sure why.

One idea in troubleshooting is to try the Config Dump tool sample, do you see all the cameras using this sample?