NTLM Login Fails After Upgrading to 2025 R2 SDK

We have been using an older version of the SDK (approximately 5–6 years old) in our integration, and after upgrading to MIP SDK 2025 R2 (25.2a), we are experiencing issues with NTLM-based logins. the basic still works ok.

We have verified that the server is accessible and running.

   if (isBasic)

  {

    System.Net.CredentialCache cc = VideoOS.Platform.Login.Util.BuildCredentialCache(serverUri, username, password, "Basic");

    \_logger.InfoFormat("Trying to add server with Basic auth type");

    VideoOS.Platform.SDK.Environment.AddServer(serverUri, cc, true);

  }

  else

  {

    System.Net.NetworkCredential nc = new System.Net.NetworkCredential(username, password);

    \_logger.InfoFormat("Trying to add server with NTLM auth type");

    VideoOS.Platform.SDK.Environment.AddServer(serverUri, nc, true);

  }

  try

  {

    \_logger.InfoFormat("Trying to login server: {0} with user: {1}", serverUri.ToString(), username);

    VideoOS.Platform.SDK.Environment.Login(serverUri, true);

  }

we get those logs after the login method execute:

2025-11-25 13:48:34,759 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to remove all servers

2025-11-25 13:48:34,762 INFO STMilestonePlugin.Services.MilestoneDeviceService - Removed all servers successfully

2025-11-25 13:48:34,762 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to add server with NTLM auth type

2025-11-25 13:48:34,797 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to login server: http://localhost/ with user: stadmin

ConnectionCheck for:http://localhost/, Took:1141ms

ConnectionCheck for:http://localhost/, Took:1142ms

ConnectionCheck for:http://localhost/, Took:1186ms

ConnectionCheck for:https://localhost/, Took:16147ms

ConstructLoginServer:Unable to identify server type:localhost

MIP: Error: SDKConfiguration.Login(Uri) ():Unable to login on server URI=http://localhost/

2025-11-25 13:48:51,092 ERROR STMilestonePlugin.Services.MilestoneDeviceService - Server http://localhost/ not found, reason:

2025-11-25 13:48:51,125 ERROR STMilestonePlugin.Services.MilestoneDeviceService - Falied to check if loggedIn

2025-11-25 13:48:51,149 INFO STMilestonePlugin.Services.MilestoneDeviceService - Not loggedin to the environment

2025-11-25 13:48:51,149 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to logout

2025-11-25 13:48:51,150 INFO STMilestonePlugin.Services.MilestoneDeviceService - Logout successfully

2025-11-25 13:48:51,150 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to remove all servers

2025-11-25 13:48:51,150 INFO STMilestonePlugin.Services.MilestoneDeviceService - Removed all servers successfully

2025-11-25 13:48:51,150 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to add server with NTLM auth type

2025-11-25 13:48:51,152 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to login server: http://localhost/ with user: stadmin

MIP: Error: SDKConfiguration.Login(Uri) ():Unable to login on server URI=http://localhost/

2025-11-25 13:48:51,182 ERROR STMilestonePlugin.Services.MilestoneDeviceService - Server http://localhost/ not found, reason:

2025-11-25 13:48:51,211 ERROR STMilestonePlugin.Services.MilestoneDeviceService - Falied to check if loggedIn

2025-11-25 13:48:51,234 INFO STMilestonePlugin.Services.MilestoneDeviceService - Not loggedin to the environment

2025-11-25 13:48:51,234 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to logout

2025-11-25 13:48:51,234 INFO STMilestonePlugin.Services.MilestoneDeviceService - Logout successfully

2025-11-25 13:48:51,235 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to remove all servers

2025-11-25 13:48:51,235 INFO STMilestonePlugin.Services.MilestoneDeviceService - Removed all servers successfully

2025-11-25 13:48:51,235 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to add server with NTLM auth type

2025-11-25 13:48:51,237 INFO STMilestonePlugin.Services.MilestoneDeviceService - Trying to login server: http://localhost/ with user: stadmin

MIP: Error: SDKConfiguration.Login(Uri) ():Unable to login on server URI=http://localhost/

2025-11-25 13:48:51,266 ERROR STMilestonePlugin.Services.MilestoneDeviceService - Server http://localhost/ not found, reason:

2025-11-25 13:48:51,298 ERROR STMilestonePlugin.Services.MilestoneDeviceService - Falied to check if loggedIn

Are the XProtect server and the MIP SDK both 2025 R2?

If the server is “secure” which means setup to use encryption, then it should try to contact https://localhost/ (not http). Other setups where the base port 80 is not used would also fail.

as i wrote we are using an old sdk, this is the dll file, i can see the sdk version is 20.1.27.1, the xprotect is with version 2025 r2

and also you can see its trying first to port 80 and then tries https

Actually you wrote that you had switched to MIP SDK 2025 R2 (25.2a). If you try the sample I mention unmodified (which will use the newest MIP SDK) do you see an issue?

sorry my bad, if by saying the sample you mentioned you mean to try using the VideoOS.Platform.Login.Util.BuildCredentialCache also for the windows user, so yes i tried and still same issue

Please test, can you log in using the Smart Client? Using the same credential and from the same PC?

If not then it is not an issue with the MIP SDK, but a general issue perhaps networking or similar.

I can see the login in the Camera Stream Resolution sample is slightly different, using Util.BuildCredentialCache also for Windows user. Could you try the sample unmodified? Does it login or do you see the same issue? (Alternatively try to modify your code to follow the sample.)

https://doc.developer.milestonesys.com/mipsdk/index.html?base=samples%2FComponentSamples%2FCameraStreamResolution%2FREADME.html&tree=tree_2.html

https://github.com/milestonesys

i can log using the same credentials.

we do have this issue with our costumers that upgraded to this version and using the old sdk version like i sent you.

the faliure eccure in the login method

i tried to use the sample you provided me but my sdk version not recognizing the addServer method with those parametes

My intention was to know if the new MIP SDK solves the issue. Please note that the MIP SDK 20.1, is so old that it is no longer supported. Using the newest MIP SDK is strongly recommended.