When is ACSystem.Close called?

I’ve had a working Access Control plugin for some time, that is in production in many different environments. I just had a new customer report an issue with the integration when adding a new Access Control system via the Management Client. It errors out at the end of the wizard (where it would normally tell you how many of each element type have been discovered) and says “Invalid Configuration Received”. In the MIP log, it states:

Error     MIPPluginTrace        Error during call to S2Access.Plugin.S2AccessSystem.Close(). Exception message: Close

I examined my code, and sure enough found that my ACSystem.Close() method was not implemented:

public override void Close()
        {
            throw new NotImplementedException("Close");
        }

Obviously I can take that throw statement away, but I’m trying to figure out what changed. We’ve used this plugin in so many places without encountering this, so the ACSystem.Close() method must rarely be called, hence my question:

When exactly is that method called (besides when the Event Server is stopped)?

Hi James Angi,

We have toke a look at your question and we can confirm you that the Close() method is only being called when Event Server is stopped.

No action from the Management Client calls that method.

We recommend you to log your stack trace to see what is happening before your Close() method is called by adding this line to your method:

Console.WriteLine("StackTrace: '{0}'", Environment.StackTrace);

Thank you for your question, hope that helps.