I am connecting my OPC Client to a local OPC Server and I get an error 0x80040202 when running my application as a service.
I am connecting my OPC Client to a local OPC Server and I get an error 0x80040202 when running my application as a service. I can connect fine when my application is not a service. This error only occurs when running the application as a service.
Can you help me?
When running some OPC application as a windows service, DCOM can get involved even though it is a local connection.
To solve this problem please configure your DCOM according to our tutorial here. In multiple places it will tell you to add "Everyone", "Interactive", "Network" and "System" and allow access. You should also add "Service" to this list and allow access. This will ensure DCOM will not interfere when running your service.