new CommunicationService.TransmitMessage issues

Hi,

Regarding the changes in allowed message types for MIP communications.

(https://developer.milestonesys.com/s/article/how-to-handle-EVS-error-Message-x-with-prohibited-data-class-type)

We serialize our objects that we send via mip messaging. We are receiving for example

“‘OurMessageID’ with prohibited data class type 'System.IO.MemoryStream” errors in the event server log.

I followed the steps and created a config file with the following.

<?xml version="1.0" encoding="utf-8" ?>

<AdditionalAllowedTransmitType message=“OurMessageID”

allowedTypes="System.IO.MemoryStream"/>          

But the error persist. For this example the message that is serialized is just a list of guids, so I also tried

allowedTypes=“System.IO.MemoryStream;System.Collections.Generic.List<System.Guid>”/>

But also didn’t work. Any idea why?

The article also mentions that “Types from plugin defined namespace are allowed”. What does this mean. Is it types defined in the plugin.def file? or in the MipPluginDefinition.cs class. How and where do I define our object types. Do you have any examples.

I am currently investigating. I even think I have reproduced the setup you describe using a hotfixed XProtect Corporate 2013R1. Next step I will let Milestone Development see my reproduction and debug deeper. I will let you know what we find.

“Types from plugin defined namespace are allowed” means that if you define a class within the plugin this one is accepted. It is possible to wrap your content in a class you define in the plugin.

Quick question: What product and version is the XProtect VMS you are currently working with? If you have a test setup with multiple versions; have you tried this on multiple versions?

Hi Bo, Thank you for the answer.

I haven’t tested yet on other versions. The version we tested is on Milestone 2022 R3 (two different systems / PC’s). Both systems has the latest event server patch applied (Milestone.Hotfix.202305021040.ES.22.33.35.75.exe).

We use the 2021 R1 MIP SDK for development.

There was a mistake in my attempt to reproduce. I cannot reproduce. There is an observation I made that leads me to a question..

When you have created the MessageCommunicationSettings.config in the installationfolder ([C:\Program](file:C:/Program) Files\Milestone\XProtect Event Server), and have restarted the Event Server service, so that it reads and uses the config file, you should be able to find this message in the Event Server MIP log (“[C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Event Server\logs\MIPLogs\MIPYYYY-MM-DD.log”)-

[date+time] Info MessageCommunication Additional allowed data class(es) for message ‘OurMessageID’ added: System.IO.MemoryStream

Could you please see if you find that message? (It will normally be logged when your plugin registers the message.)

This will be a valuable clue as it will tell us whether the Event Server did read and parse the MessageCommunicationSettings.config file.

Hi Bo,

You are right. The config file never got imported. There was an illegal character in the config file.

“Error MessageCommunication Error during read of MessageCommunicationSettings.config: System.Xml.XmlException: ‘<’, hexadecimal value 0x3C, is an invalid attribute character”

After that was fixed, the file imported, and everything started working.

Thank you very much for your effort and assistance.

Thank you for the feedback. There is a valuable lesson in how we were able to troubleshoot based on log messages..