C# Windows Service COM exception 80080005 when starting application

后端 未结 1 990
走了就别回头了
走了就别回头了 2020-12-18 14:07

I have created a Windows Service that try to start an application (in this case CATIA).

I use the following code:

private Application GetApplicationO         


        
相关标签:
1条回答
  • 2020-12-18 15:03

    I have now found a solution.

    I found it in another forum, where someone had problem to run another application through web. Strangely enough, that solution worked for me too.

    1. Click run
    2. enter dcomcnfg
    3. Browse your way to Component services>Computers>My Computer>DComConfig>
    4. Then find your application, in my case "CATIA Application".
    5. right click>properties
    6. Go to "Identity" tab
    7. Change the user who should run this application from "The launching user" to "The interactive user".

    Now it works for me. I am still not able to catch the process (GetActiveObject) if I start it manually first. But at least the Service manage to start a new instance without any errors.

    I think this can be helpful for a lot of people who come across this error message when trying to start an application from a Windows Service.

    0 讨论(0)
提交回复
热议问题