ServerNotFoundMIPException when use Basic User

Hello,

I am facing strange login issue with basic and unable to resolve it as there is no more information.

I am getting ServerNotFoundMIPException when try to login using basic user through SDK. Below is Code snippets to understand the logic. My basic user is in administrator group.

Following thing works with basic user:

  1. I am able to login into XProtect Management Client;
  2. Basic user works fine for this sample CameraStreamResolution: https://github.com/milestonesys/mipsdk-samples-component/tree/main/CameraStreamResolution

My code works fine if I use default or window auth mode.

I tried to validate with version of MilestoneSystems.VideoOS.Platform. I am using 22.2.0. I ran the sample app in the same version and it is working fine there.

            switch (_auth)
            {
                case Authorizationmodes.DefaultWindows:
                    cc = Util.BuildCredentialCache(uri, "", "", "Negotiate");
                    break;
                case Authorizationmodes.Windows:
                    cc = Util.BuildCredentialCache(uri, _user, _securePwd, "Negotiate");
                    break;
                case Authorizationmodes.Basic:
                    cc = Util.BuildCredentialCache(uri, _user, _securePwd, "Basic");
                    break;
            }
            VideoOS.Platform.SDK.Environment.AddServer(_secureOnly, uri, cc);            
            try
            {
                VideoOS.Platform.SDK.Environment.Login(uri, IntegrationId, IntegrationName, Version, ManufacturerName);
            }
            catch (ServerNotFoundMIPException snfe)
            {
                Log.Error("Login Server not found: {exception_msg}: {exception}",
                    snfe.Message, snfe);
                VideoOS.Platform.SDK.Environment.RemoveServer(uri);
                throw snfe;
            }

Please suggest how can I resolve this?

I looked through your code and compared to the CameraStreamResolution sample code and they are the same (aside from catch statement, but in this case, the catch is not a matter). But you mentioned that the sample works fine and your sample would not, that means there might be differences between them. Please put breakpoints on the code and check if you use correct uri/user/password when you use basic user (and see what you get).

Thanks for the response. URI is correct as I tested my sample code with Window and Default auth mode and it works fine. user/password is correct even if it is wrong then I expect invalid username or password error.

Can there be issue with version support from of Milestone SDK and .Net?

Please check if _secureOnly is correct. If there is difference between actual installation and _ secureOnly in the code then you will fail to login.

Value of it is correct as well. It works fine for DefaultWindows and Windows auth mode.

Please verify if following settings are correct between installation and the sample.

  1. Start Management Client – Tools – Registered services – click Network. You will see Server settings and please check if configuration is correct.
  2. Start Management Client - go to left pane on the top, you will see server name – right click and select Properties. Please check if URLs is correct.
  3. When you run the sample, please use full domain server name.
  4. Please check if you use encrypted server.

Please make sure that if there are differences between actual installation and settings, the sample would not work.