SendMessage with NewAlarmCommand raises an exception

Hi,

On some systems we have noticed a problem when we try to send a NewAlarmCommand message with EnvironmentManager.Instance.SendMessage

When we use Sendmessage in a smart client plugin, the smartclient shows the following exception:

XProtect Coporate 2022 R2: Works for both admin and basic user

2023 R3: Exception for both admin and basic user.

2024 R1: Admin user works, basic user gets exception.

2024 R2: same as R1.

I have tried the following code in the RGBVideoEnhancement sample plugin:

EventSource eventSource = new EventSource()
  {
    FQID = _viewItemManager.SelectedCamera.FQID,
    Name = _viewItemManager.SelectedCamera.Name
  };
 
  string eventMessage = "4";
  string eventClass = "Test";
 
  EventHeader eventHeader = new EventHeader()
  {
    ID = Guid.NewGuid(),
    Class = eventClass,
    Timestamp = DateTime.Now,
    Message = eventMessage,
    Name = eventSource.Name,
    Source = eventSource,
    Priority = 5,
    PriorityName = "prioName"
  };
 
  Alarm alarm = new Alarm()
  {
    EventHeader = eventHeader,
    StateName = "stateName",
    State = 4,
    AssignedTo = eventSource.Name
  };
 
 EnvironmentManager.Instance.SendMessage(
      new Message(MessageId.Server.NewAlarmCommand) { Data = alarm });
}

Hi Fredrik,

Milestone development will start an investigation.

Hey Fredrik

We have tried to reproduce this issue, but we can’t. We have tried with AD, Basic users and as admin and normal user. We see no error.

To get an understanding why this is failing in your case, we have some general questions:

  • Are you using same version of Smart Client for all tests or do you install the smart client with same version as Corporate
  • The error you receive is not something written by our services, it looks like a WCF error. There for the reason could be found in the IIS. Have you checked windows event log on the server running corporate?
  • Are you running with HTTPS enabled?
  • What version of windows are the servers running on?

Hi Henrik,

  • Are you using same version of Smart Client for all tests or do you install the smart client with same version as Corporate - I have tested on the server computer with the same version of smart client as the server.
  • The error you receive is not something written by our services, it looks like a WCF error. There for the reason could be found in the IIS. Have you checked windows event log on the server running corporate? - I couldn’t find any error about this problem in the windows event logs.
  • Are you running with HTTPS enabled? - No
  • What version of windows are the servers running on? - 2023 R3 on Windows 11. The others on Windows 10.

This is a known issue, fortunately this also means there is a patch!

https://developer.milestonesys.com/s/article/Getting-Alarm-list-error-occurred-when-verifying-security-for-message-troubleshooting?language=en_US

Thanks Bo!

I patched the 2023 r3 and it works on that system now.

It seems I was too quick to judge the other versions. It was probably just that the basic user didn’t have access to create alarms on those systems. I just assumed it was the same error, sorry about that.

Seems this is solved, otherwise I start a new one.