Exception thrown reading from Audit Log

Hi

I’m getting an exception when using the following LogClient ReadLog command when trying to read from the Audit Log.

The command is from the LogRead Sample

VideoOS.Platform.Log.LogClient.Instance.ReadLog(

    VideoOS.Platform.EnvironmentManager.Instance.MasterSite.ServerId,

    (int)1,

    out \_result,

    out \_names,

    group);

The group = “Audit”

Error

CommunicationServiceException: Exception of type ‘VideoOS.LogServer.Communication.CommunicationServiceException’ was thrown.

This command works fine with the group set to System or Rules, just Audit fails. I saw and earlier post around this error which show time sync to be the problem but the time is very close on both the client and the server.

The server is corporate 2020 R2 and the MIPSDK is 2020 R2

Any other suggestions to look into?

Thanks

Ian

Did you add VideoOS.Platform.SDK.Log into References in Visual Studio?

Did you add Log initializing such as this?

VideoOS.Platform.SDK.Log.Environment.Initialize(); // Initialize Log

Does this unmodified sample work for you ?

https://developer.milestonesys.com/s/article/read-Audit-System-or-Rule-logs-from-the-MIP-SDK

@Rie Kiuchi (Milestone Systems)​ Hello, i am currently experiencing the same problem with this sample, i am getting a “ServerCommunicationException” after running the unmodified LogRead sample, the time is in sync, it fails at this line :

VideoOS.Platform.Log.LogClient.Instance.ReadLog(VideoOS.Platform.EnvironmentManager.Instance.MasterSite.ServerId, 1, out _result, out _names, group);

your help would be greatly appreciated !