Error starting service on Windows Server 2012 R2

Service Exception :: [20/05/2019 07:48:19] :: System.NullReferenceException: Object reference not set to an instance of an object.
at Certify.Service.OwinService.Start() in C:\Work\GIT\certify\src\Certify.Service\Program.cs:line 178
at Topshelf.ServiceConfiguratorExtensions.<>c__DisplayClass2_01.<WhenStarted>b__0(T service, HostControl control) at Topshelf.Builders.DelegateServiceBuilder1.DelegateServiceHandle.Start(HostControl hostControl)
at Topshelf.Runtime.Windows.WindowsServiceHost.OnStart(String[] args)

Hi, are you on the latest version of the app? Has the app worked before?

The error line number doesn’t seems to match up with anything important in the code, which is odd unless this is an old version of the app.

On startup we read configuration from c:\ProgramData\Certify\serviceconfig,json - if this file was corrupted or inaccessible there could be problems at startup - deleting the file will revert back to the default config.

Thank you, very much. The file in question was empty. I deleted it and the service starts again.

1 Like

Thanks, I’ll get something added to detect and prevent that in the future.