The service threw an unhandled exception: System.UnhandledExceptionEventArgs
e.ToString() haven't done what was expected in this case. From my understanding of the situation, UnhandledExceptionEventArgs can be tricky.
Either it is e.Exception.ToString() that should be written there, or some manually constructed message (I often find it useful to log InnerException right away, if available.)
This is exactly what I got in my console:
e.ToString()
haven't done what was expected in this case. From my understanding of the situation, UnhandledExceptionEventArgs can be tricky. Either it ise.Exception.ToString()
that should be written there, or some manually constructed message (I often find it useful to log InnerException right away, if available.)https://github.com/PeterKottas/DotNetCore.WindowsService/blob/4c0052bef2217c3f6b3ec15a98e23335fc07aa88/Source/PeterKottas.DotNetCore.WindowsService/ConsoleServiceHost.cs#L126