I'm developing an application in .NET 6.0 that needs to use a COM object (which is a strict requirement). I now need to schedule and launch this application through a job scheduling service.
I considered creating a Windows service to handle the job because it provides useful features like automatically restarting the service if it crashes, ensuring better business continuity.
However, I encountered an issue: when the application is launched by the service using Process.Start()
, it fails to access the COM object due to authorization issues.
Details:
My questions:
Any guidance or suggestions on how to resolve this issue would be greatly appreciated!
I solved the problem. My problem was that the COM Object "Identity" property was setted on "Interactive user", so obviously when i disconnected from the session it ceased to work. My solution was to set a specific user and run the Service under that user. Thanks for your answer.