Login works in fits and starts

Hy, thanks for support.

I developped a component integretion component application.

My problem is the login that on a specific machine sometimes works properly, other times fails.

My server Mileston is Corporate 2018 R3.

this is my code (login phase): the MIPException has always a message null.

if (EnvironmentManager.Instance == null)

  **{**

    **annotations.Append("EnvironmentManager.Instance = null: " + DateTime.Now+Environment.NewLine);**

    **VideoOS.Platform.SDK.Environment.Initialize();     // General initialize. Always required**

      **annotations.Append("VideoOS.Platform.SDK.Environment.Initialize(): " + DateTime.Now + Environment.NewLine);**

      **VideoOS.Platform.SDK.UI.Environment.Initialize();    // Initialize ActiveX references, e.g. usage of ImageViewerActiveX etc**

      **annotations.Append("VideoOS.Platform.SDK.UI.Environment.Initialize(): " + DateTime.Now + Environment.NewLine);**

      **VideoOS.Platform.SDK.Export.Environment.Initialize();**

      **annotations.Append(" VideoOS.Platform.SDK.Export.Environment.Initialize(): " + DateTime.Now + Environment.NewLine);**

    **}**

  **try {**

      **CredentialCache ccc = VideoOS.Platform.Login.Util.BuildCredentialCache(uri, userId, pswd, "Basic");**

      **VideoOS.Platform.SDK.Environment.AddServer(uri, ccc);**

      **VideoOS.Platform.SDK.Environment.Login(uri);**

    **}**

  **catch (MIPException MipExc)**

  **{**

      **MessageBox.Show("Possibili cause: " , "Login fallito: ",MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);**

      **return;**

  **}**

Why for example does on machine with Corporate 2018R2, instead always run?

Depending on some settings ?

Thanks in advance,

Gabriele

It sounds strange that it sometimes fails and other times not…

Is there any pattern in whether it always happens at the time where the Initialize methods above is also executed or is it random whether these have been called just before or not?

Also can you provide more information about the exception? The specific type, the call stack, etc?

Thanks a lot Peter,

I try to give you more information:

On my developping environment machine is all ok. The server is Corporate 2018R2 or 2018R3 indifferently)

When I test the application on my collegue’s machine on an other city , where unfortunaly I’cannot debug with Visual Studio in remote mode, the login runs only after two or three consecutive attempts.

The server Milestone is different but of type Corporate2018R3

I send you the code picture and the log as your request.

The exception is on VideoOS.Platform.SDK.Environment.Login instruction.

It maybe some delay on comunication?

Thanks again,

Gabriele

The exception you get is most likely a ServerNotFoundMIPException - that would be thrown with no message - but the reason behind could be any kind of issue making it fail getting in contact with the server. Could you please try check

[c:\ProgramData\Milestone\MIPSDK\MIP](file:c:/ProgramData/Milestone/MIPSDK/MIP).log and see if there is anything useful in there? If not please try do a wireshark and see if that gives you any hint what is going on - if not feel free to upload it here and we will have a look.

Thanks Peter,

I noticed that on my Server I have [c:\ProgramData\Milestone\MIPSDK\MIP](file:c:/ProgramData/Milestone/MIPSDK/MIP).log files,

but sfortunately on my collegue’s machine the directory exists but is empty.

Is there some error in server installation?

I’ll try to check with a wireshark.

thanks at the moment,

Gabriele

Hi Gabriele,

The log should be on the machine that does the login - not the server (unless they are the same). If nothing shows up there it might be due to user rights, so please make sure that whatever user account is used for running the login application has proper rights to write to the log folder.

Best regards,

Peter

Thanks Peter.

I did an upgrade on that machine to Windows 10 and the problem disappeared.

I suppose the problem was linked in a strange way to the Operating system.

I’m going to test the application on another client that use Windows 7.

At the momemt is all ok.

Grazie

Gabriele