Hi All,
I am trying to run a extension when the vault is bought online. I have the following code
[MFiles.VAF.Common.EventHandler(MFEventHandlerType.MFEventHandlerAfterBringOnline)] public void Startup(EventHandlerEnvironment env) { Utils.AddToLogging("StartUp", "INFO", "MFTaskScheduler Started."); }
When I restart the vault, i get the following in the eventlog.
M-Files Online DEV {E7BE591A-38FF-47EB-BD54-C1729A8190CE} The operation was canceled. Vault.cpp, 13556, The operation was canceled. (0x8013153B) VaultDBSessionEvents.cpp, 1431, The operation was canceled. (0x8013153B) VaultDBSessionEvents.cpp, 2218, The operation was canceled. (0x8013153B) VaultScriptSessionTemplates.cpp, 485, The operation was canceled. (0x8013153B) VaultScriptSessionTemplates.cpp, 457, The operation was canceled. (0x8013153B) VaultScriptSessionTemplates.cpp, 679, The operation was canceled. (0x8013153B) CoActiveScriptSite.cpp, 915, The operation was canceled. (0x8013153B) CoActiveScriptSite.cpp, 745, The operation was canceled. (0x8013153B) AfterBringOnline::TaskScheduler.MFEventHandlerAfterBringOnline, 22, The operation was canceled. (0x8013153B) CoDynamicCLRObjectWrapper.cpp, 578, The operation was canceled. (0x8013153B) CoDynamicCLRObjectWrapper.cpp, 349, The operation was canceled. (0x8013153B) ManagedError.cpp, 152, The operation was canceled. (0x8013153B) VaultApplicationBase.cs, 270 (IL:19), The operation was canceled. (0x8013153B) VaultApplicationBase.cs, 3487 (IL:27), The operation was canceled. (0x8013153B) (M-Files 25.6.14925.4 2025-07-28T11:09:46.275Z)
The "AddToLogging" works fine everywhere else so I don't think it has anything to do with this, but it just write a text file. It works fine with any other event handler.
Can anyone see what I am doing wrong? its 3 lines of code so there is not much debugging I can do.