I am attempting to create a Windows Service that will perform an action whenever a new PI notification is triggered. I have created a Windows Form application to do something similar in the past, but the code is not successfully translating over. The main line that it is getting hung up on is:
List<ANNotificationInstances> lastInstances = monitoredNotifications.GetActiveInstances();
*monitoredNotifications is an ANNotificationList
Both GetActiveInstances and GetInstances seem to break my Service (although it claims to still be running) and when I attempt to debug, the Service will not start at all. Incorporating try/catch functions unfortunately did not resolve the issue either.
Thanks in advance for your help.