Unable to connect to Toolkit (RawLiveSource and secured Milestone server)

Hi!

I’m trying to make work my application with secured Milestone server. Authentication works fine but I can’t make work live streaming using VideoOS.Platform.Live.RawLiveSource. Both Milestone client and VideoViewer from component samples works fine. But when I’m trying to start live stream using RawLiveSource, I’m getting “Unable to connect to Toolkit” exception. Is there any additional configuration should be made to make RawLiveSource work with SSL server?

When using xLiveSource the error most often indicates a failure of the camera or the recording server of a general nature. Can you please double-check that Smart Client or VideoViewer works in the same PC, same user on the same camera?

General advise.

Please read this article, there is a “Getting video using video sources” section on the page, it might be helpful for you -

https://developer.milestonesys.com/s/article/exploring-the-MIP-SDK-recommended-top-SDK-samples

what you want might be RawLiveSource, if it is raw data you want please also see the “The GenericByteData format” -

https://doc.developer.milestonesys.com/html/index.html?base=mipgenericbytedata/main.html&tree=tree_3.html

Thanks for your response.

Yes, this problem actually appeared after we configured Milestone Server to work with secured connection (client application works well with non-SSL server). And this problem also was at Smart Client and Video Viewer before I installed proper certificate on a client machine. So I thought maybe there is an option to specify client’s certificate to use in SDK.

We tested following combination of encrypted server and clients -

  1. Encrypted Server - client certificate installed

    → Works fine both Smart Client and MIP SDK sample (we added small changes to use RawLiveSource).

  2. Encrypted Server - client certificate NOT installed

    → Could login to Smart Client but no video, and MIP SDK sample has an error as same as yours – “VideoOS.Platform.CommunicationMIPException: 'Unable to connect to toolkit!”.

You will need to install client certificate properly, you might already know how to do it but let me introduce this documentation -

https://milestonedownload.blob.core.windows.net/files/XProtect%202019%20R2/Manuals%20and%20guides/Advanced%20VMS/Guides%20and%20documents/Certificates%20guide/MilestoneXProtectVMSproducts_CertificatesGuide_en-US.pdf

Basically the certificate should be the same whether using Smart Client or MIP SDK based client..

Hi! Thanks for response.

Can certificate be not used while authentication? VideoOS.Platform.SDK.UI.LoginDialog component used for authentication in VideoViewer sample. I’m using following code:

VideoOS.Platform.SDK.Environment.Initialize();
VideoOS.Platform.SDK.Export.Environment.Initialize();
VideoOS.Platform.SDK.Media.Environment.Initialize();
var authType = username.Contains("\\") ? "Negotiate" : "Basic";
var credentialCache = Util.BuildCredentialCache(serverUri, username, password, authType);
Environment.AddServer(serverUri, credentialCache);
Environment.Login(serverUri);

No, you must have a correct certificate.

Are there any additional steps need to be made to force SDK to use certificate?

If Smart Client can login and get images, then MIP SDK samples or integrations can do the same.

Do you have a situation where Smart Client works and SDK does not work? Please test with same user, same server and same client machine.

So please verify if you can login with SC (not SDK).