Demo Access Server event type error

I built the demo access plugin from source in visual studio and deployed it to my 2018 event server. Using the demo access server application for testing, when I connect to it from the milestone management client the plugin hangs waiting for event types from the demo access test server.

Since the source for this demo access server isn’t provided, I’m not sure why its not responding with the event types or why the plugin gets stuck waiting endlessly for event types if none are sent. By the way its definitely talking to the demo server since it does get past the doors configuration etc, and also using a bad password or incorrect port it doesn’t get this far so its definitely connecting to it..which makes me think the problem is only with event types.

i’m including a screenshot

I suspect that this is a versions mismatch.

Can you confirm that the MIP SDK is 2020 R2 (newest) while the test server is 2018 Rx? (Please tell me the exact versions.)

I might have a workaround. The issue might be solved by doing the following:

  1. Stop the XProtect Event Server service;
  2. Replace two files (make backup copies so that you can revert) in the Event Server installation folder: [C:\Program](file:C:/Program) Files\Milestone\XProtect Event Server\ with the same files from the newer MIP SDK that you have used in development. The two files are: VideoOS.Platform.AccessControl.dll and VideoOS.Platform.dll
  3. Start the Event Server service.

Please let me know whether this solves the issue.

thanks. will give it a try on Monday

I am using the 2020 MIPS SDK, with the 2018 R2 milestone server.

The event service won’t run with those files replaced.

I saw these errors in the logs.

2020-08-31 9:47:57 AM UTC-07:00 Error Unhandled

Unhandled exception: System.TypeLoadException: Could not load type

‘VideoOS.Platform.Messaging.Internal.CommunicationService’ from

assembly 'VideoOS.Platform, Version=1.0.0.0, Culture=neutral,

PublicKeyToken=bc60fba4a7969f89’.

at VideoOS.Event.Server.MIP.Environment.ESEnvironmentManager.StoreCurrentStateInMipCache()

at VideoOS.Event.Server.MIP.Environment.ESEnvironmentManager.ConfigurationChangedDelayThread()

at System.Threading.ExecutionContext.RunInternal(ExecutionContext

executionContext, ContextCallback callback, Object state, Boolean

preserveSyncCtx)

at System.Threading.ExecutionContext.Run(ExecutionContext

executionContext, ContextCallback callback, Object state, Boolean

preserveSyncCtx)

at System.Threading.ExecutionContext.Run(ExecutionContext

executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

2020-08-31 9:48:59 AM UTC-07:00 Info Log

-------------------------- Version: 12.2.5658.1

2020-08-31 9:48:59 AM UTC-07:00 Info Log

Available MAC address:98:90:96:AC:0F:DB

2020-08-31 9:48:59 AM UTC-07:00 Info Log

Available MAC address:98:90:96:AC:0F:BB

2020-08-31 9:48:59 AM UTC-07:00 Info Log

Local time is now: 9:48:59 AM

2020-08-31 9:48:59 AM UTC-07:00 Info Log

UTC time is now: 4:48:59 PM

2020-08-31 9:48:59 AM UTC-07:00 Info Server

Event Server is starting.

2020-08-31 9:48:59 AM UTC-07:00 Info Server

Server machine name: DESKTOP-9I2VKQK, Server domain name:

DESKTOP-9I2VKQK

2020-08-31 9:48:59 AM UTC-07:00 Info Server

Event Server feature manager started.

2020-08-31 9:48:59 AM UTC-07:00 Info FeatureManager

XProtect Corporate (or similar) detected, Alarm, Map and Access

Control feature started

2020-08-31 9:48:59 AM UTC-07:00 Info ServerRegistration

Server registration has started.

2020-08-31 9:49:00 AM UTC-07:00 Info ServerRegistration

Got registered services, found 6 services allready registered.

2020-08-31 9:49:00 AM UTC-07:00 Info ServerRegistration

Found existing Event Server registration with same service instance.

Skipping further registration.

2020-08-31 9:49:00 AM UTC-07:00 Info ServerRegistration

Attempting to write custom data to service with instance

42498325-abde-468d-89db-60d11edd9f30

2020-08-31 9:49:00 AM UTC-07:00 Info ServerRegistration

Server registration completed successfully.

2020-08-31 9:49:00 AM UTC-07:00 Info ServerConfigManager

Server ‘DESKTOP-9I2VKQK[desktop-9i2vkqk]’ created.

2020-08-31 9:49:00 AM UTC-07:00 Info SQLManager

Database connection established.

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Initializing MIP environment.

2020-08-31 9:49:00 AM UTC-07:00 Info ESEnvironmentManager

Access Control plugin loaded: Demo Access Control Plug-in v2.0 -

Milestone Systems A/S

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: VideoWallHelper v1.0.0.0 - Internal MIP Component

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: GisMapLocationHelper v1.0.0.0 - Internal MIP Component

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: Analytics Events v12.2a - Milestone Systems A/S

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: Customer dashboard plugin v0.0.1 - VideoOS plugin

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: Generic Events v12.2a - Milestone Systems A/S

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: LicenseService v1.0.0.0 - Internal MIP Component

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: ServiceHelper v1.0.0.0 - Internal MIP Component

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: Event Server internal AC plugin v12.2.5658.1 -

Milestone Systems A/S

2020-08-31 9:49:00 AM UTC-07:00 Info MapPlugInManager

Plugin loaded: Milestone XProtect Transact v12.2a - Milestone Systems

A/S

2020-08-31 9:49:00 AM UTC-07:00 Info Server

Database Version: 12.2.5

2020-08-31 9:49:00 AM UTC-07:00 Error Server

Fatal error starting features with message: Could not load type

‘VideoOS.Platform.Messaging.Internal.CommunicationService’ from

assembly 'VideoOS.Platform, Version=1.0.0.0, Culture=neutral,

PublicKeyToken=bc60fba4a7969f89’. Stackstace: at

VideoOS.Event.Server.MIP.Environment.ESEnvironmentManager.OnItemStateChangedEvent(Object

sender, BaseItemStateChangeEventArgs baseItemStateChangeEventArgs)

at VideoOS.Event.Server.Items.ItemStatus.FireBaseItemStateChange(Object

sender, BaseItemStateChangeEventArgs eventArgs)

at VideoOS.Event.Server.Items.BaseItem.FireItemStateChangedEvent(String

state, Nullable`1 before, Nullable`1 after)

at VideoOS.Event.Server.Items.BaseItem.SetState(String name, Boolean state)

at VideoOS.Event.Server.Items.BaseItem.set_Enabled(Nullable`1 value)

The issue you are seeing is caused by enhancements to the Access Control Framework introduced with 2019R1. See - https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/mip2019r1_intro.html&tree=tree_home.html

A workaround is to avoid the new functionality that was introduced. You could download the MIP SDK 2018R3 and build the Demo Access Control plugin sample (either with MIP SDK 2018R3 or MIP SDK 2020R2) and see a sample that works not using the newer enhanced functionality.

If you want to download the old MIP SDK here is a link for you - http://download.milestonesys.com/MIPSDK/MIPSDK_Installer_2018R3.msi

Ok, so I’m trying to just build with one MIP SDK for now. so it sounds like if I get the demo access control source that came with the 2018 SDK, i could build that against the 2020 SDK and hopefully get past this issue?

i don’t need or even know what enhancements are in 2020 since this is our first time building an access control plugin for milestone

I think there may be too many differences between the 2018 SDK and 2020 SDK…the demo access plugin doesn’t compile:

Severity Code Description Project File Line Suppression State

Error CS0426 The type name ‘DemoApplicationService’ does not exist in the type ‘DemoAccessControlPlugin’ DemoAccessControlPlugin [C:\mips-demo\DemoAccessControlPlugin\Service](file:C:/mips-demo/DemoAccessControlPlugin/Service) References\DemoApplicationService\Reference.cs 501 Active

So is it correct to assume that we need to build a new plugin for each version of the mips sdk ?

The DemoAccessControlPlugin sample consists of two parts: The DemoAccessControlPlugin and a DemoServerApplication (exe file, not supplied as source code). What makes these two parts speak together is a service reference and you will find it in the sample in a folder “Service References”. The error you describe indicates that the service reference is missing or wrong. If is important to note that if you have mixed the elements from the 2018R3 with elements from the 2020R2 this will not work.

I cannot say exactly what is wrong but hope this will be enough of a hint that you will be able to solve this.

A DemoAccessControlPlugin build with the feature set of 2018R3 will work for every version of the XProtect Event Server including the newest versions. (except very old versions)

A DemoAccessControlPlugin build with the feature set of 2019R1 will work for version 2019R1 and newer of the Event Server including the newest versions but will not work for versions 2018R3 and older.

A DemoAccessControlPlugin in MIP SDK 2020R2 uses the feature set of 2019R1.

We have a knowledge base article with some general information on version compatibility: https://developer.milestonesys.com/s/article/about-MIP-SDK-compatibility-with-XProtect-product-versions