Closed jean3x7 closed 2 years ago
I found a solution.
If the app started hidden, the above message happens, the workaround is to start the app and then hide (eg running on the web server).
I know exactly what you ran into. And yes, the only solution I know so far is to run it starting out in an 'interactive' mode (aka having a window). I don't believe there's any other workaround for it, if you do figure out something else let me know.
I'll look into specifying that into the requirements section. Thanks~
Thanks for your reply, the 'interactive' mode is a solution!
Now i can forward the info to my web socket
How to run this lib through Task Scheduler?
It works perfectly if starting manually via compiled exe or calling the exe via cmd/powershell.
But in Task Scheduler Returns below error: "mediaManager.Start()"
System.Exception: The specified service does not exist as an installed service.b__12_2>d.MoveNext() in C:\Projects\SystemMonitorWebInterface\bin\SystemWebMonitorInterface\SystemWebMonitorInterface\Program.cs:line 213
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at SystemWebMonitorInterface.MediaManager.Start() in C:\Projects\SystemMonitorWebInterface\bin\SystemWebMonitorInterface\SystemWebMonitorInterface\MediaManager.cs:line 63 at SystemWebMonitorInterface.Program.<>c.<