TransmitMessage is not working between client plugin and component integration when encryption is ON

I am developing a solution that will utilize the TransmitMessage to send data from Smart Client Plugin to MIP Component.

I have a plugin running on the smart client that sends data to MIP component (Run under event sever - Started by background plugin with TargetEnvironments - EnvironmentType.Service) using TransmitMessage.

Everything is working fine, in case of of Encryption option is OFF, I am able to receive the message.

However, when Encryption is ON. communication is not working.

Additional Details:

  • Tested with XProtect 2023 R3, 2022 R2

  • Followed this document to create self-signed certificate:

https://doc.milestonesys.com/sysarch/pdf/2023r3/en-US/MilestoneXProtectVMSproducts_Cer

tificatesGuide_en-US.pdf

  • Client Code (Smart Client - Plug-in Integration) chunk — Sender
void SendMessage( string jsonRequest)
{ 
Item masterSite = EnvironmentManager.Instance.GetSiteItem(EnvironmentManager.Instance.MasterSite);
            MessageCommunicationManager.Start(masterSite.FQID.ServerId);
            MessageCommunication messageCommunication = MessageCommunicationManager.Get(masterSite.FQID.ServerId);
 
 messageCommunication.TransmitMessage(new Message("MyCustomMessageMessage", jsonRequest), null, null, null);
 
}
  • MIP Component code chunk – Receiver
void Register() {
Item masterSite = EnvironmentManager.Instance.GetSiteItem(EnvironmentManager.Instance.MasterSite);
            MessageCommunicationManager.Start(masterSite.FQID.ServerId);
            MessageCommunication messageCommunication = MessageCommunicationManager.Get(masterSite.FQID.ServerId);
 
 msgRef.Add(messageCommunication.RegisterCommunicationFilter(new MessageReceiver(MyCustomMessageHandler),
                   new CommunicationIdFilter("MyCustomMessageMessage")));
}
 
 
private object MyCustomMessageHandler(VideoOS.Platform.Messaging.Message message, FQID destination, FQID sender)
        {
            System.Diagnostics.Debug.WriteLine("MyCustomMessageHandler: Message received");
            EnvironmentManager.Instance.Log(false, "MyCustomMessageHandler", "Message received");
            if (!(message != null && message.Data != null && message.Data is string msgData))
            {
                return null;
            }
          // MY CODE
            return null;
        }

I will test and try to reproduce, before I do I would like a clarification.

Tested with XProtect 2023 R3, 2022 R2. Does that mean you have tested both 2023R3 and 2022R2, or that you have XProtect 2023R3 and MIP SDK 2022R2?

Please state the product and version of XProtect and verify that you are using the newest version of the MIP SDK to build the solution. (Please list if you have tried several servers or SDK versions..)

  • I have tested with both Milestone version XProtect 2023 R3, 2022 R2.
  • MIP SDK version is same for both XProtect versions.
  • I am using single machine setup.

For me it works. I suspect something else is happening. First step are there any errors in the Event Server logs?

[C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Event Server\logs\MIPLogs or [C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Event Server\logs

No error message in the logs.

I am using below code chunk for login in Component. Is it causing any issues?

Could you please share you sample code which is working?

string hostManagementService = "http://localhost";
                    Uri uri = new UriBuilder(hostManagementService).Uri;
                    VideoOS.Platform.SDK.Environment.AddServer(uri, CredentialCache.DefaultNetworkCredentials);
 
                    Trace.WriteLine("Login to localhost with DefaultNetworkCredentials");
 
                    try
                    {
                        VideoOS.Platform.SDK.Environment.Login(uri);
                        Connected = true;
                    }
                    catch (Exception ex)
                    {
                        Trace.WriteLine($" Login fail - run loginForm cause : {ex}");                        
                    }

@Bo Ellegård Andersen (Milestone Systems)​ any update on this?

My code. Rather quick and dirty I modified the Chat sample the SC part and created a standalone app.. I hope the source code does make sense for you..

and