Troubleshooting
Fixing OPC DA Subscription Callback Faults in a WinCC HMI Client
Short answer
The fault is on the reverse COM path: the WinCC OPC server must call back into the client to deliver subscribed values, and that callback is denied when the client service and the server run under different Windows accounts. Set the client service's Log On identity to the account running WinCC, restart it, and re-create the connection; that single change cleared the fault in the documented case.
On this page
The fault is on the way back, not the way out. When an OPC DA client subscribes to WinCC tags, the server has to call back into the client process to deliver the changes, and that reverse leg is what fails: the connection reports connected, then flips to faulted with 0x8000FFFF on the subscription advise the moment tags are dropped. The fix that cleared the documented case is an identity match: run the client service under the same Windows account as the WinCC runtime, restart it, and rebuild the connection. Locality does not protect you, because a service account and an interactive account on one machine are still two security contexts. Change the identity before touching the firewall or the DCOM defaults.
Two COM paths, one connection #
OPC DA runs on COM, and a working data link needs two directions. Defining the connection exercises the forward direction only: the client activates the server, obtains its interfaces and browses the address space. That is the part that reports connected.
Every subscription then exercises the reverse direction. The client asks the server to advise a connection point, and from that moment the server calls into the client whenever a subscribed value changes. The server's shutdown notification rides the same reverse mechanism. Both calls land in the client process, and COM applies access checks to them exactly as it does to the forward call.
That is why the fault appears at the tag drop and not before: the drop is the first operation that needs the reverse path. It is also why a local server changes nothing. A Windows service runs under the identity configured for that service; an interactive runtime runs under the logged-on user. Two processes under two accounts on one machine remain two security contexts, and the callback between them can be refused.
Reading the symptoms #
The client's own status page names the failure, an error advising the subscription callback, with DCOM security named as the likely cause. Read the observations this way:
- Connection shows connected before any drop: forward activation works, and it says nothing about callbacks.
- The drop succeeds and the tags appear, but carry an error cross and a quality of "OPC not connected": the tag records exist, yet no subscription was ever advised.
- The status moves from connected to faulted exactly at the drop: the failing call is the subscription setup, not the connection.
- The subscription advise returns 0x8000FFFF, E_UNEXPECTED: the connection-point advise call could not be established, and error-code references pair exactly this code with failing asynchronous callback setup.
- The shutdown-hook advise returns 0x80070005, E_ACCESSDENIED: a separate reverse registration was refused on authorization grounds, and it appeared during the initial connect, before any tag drop.
- Deleting the connection and rebooting clears the fault until the next drop: you reset the state, not the permission.
The browser error that follows is downstream: the connection it was using is faulted.
The fix: match the logon identity #
- Identify what the client runs as. In Services, reached through Control Panel > Administrative Tools > Services, open the client service's properties and read the Log On panel. In the documented case the service ran under its default, the system account.
- Identify what the server runs as: the Windows account the WinCC runtime and its OPC server run under, the interactive user logged into the machine.
- On the Log On panel, set This account to the WinCC account. The account must hold the Log on as a service right for the service to start under it.
- Restart the service. It now runs with that account's profile and permissions, so use an account appropriate for both jobs.
- Only now delete the faulted connection, recreate it, and drop a single test tag.
That one change closed the documented case. Nothing in it requires opening the firewall or the default DCOM permissions.
Worked example: local WinCC 6.2 SP2 and an Ignition 7.1.2 client on Windows XP SP3 #
This case is drawn from a single-machine station; the same fault as seen from the client side of the fence, with its subscription errors, is covered in fixing callback and subscription faults on the OPC-COM client.
Inputs:
- Server: WinCC 6.2 SP2, runtime open and running, under the logged-in interactive user (case log).
- Client: Ignition 7.1.2 running as a Windows service, default identity the system account (service configuration).
- Link: local, connection named OPCServer.WinCC, firewall already disabled (case log).
- Console: state CONNECTING at 5:14:58 PM; shutdown-hook advise refused at 5:15:01 PM; server CLOSED, then FAULTED, at 5:15:01 PM.
- Subscription advise on the tag drop: 0x8000FFFF, E_UNEXPECTED. Shutdown-hook advise: 0x80070005, E_ACCESSDENIED.
Rule in words: score each direction separately. The forward direction has one leg, client to server. The reverse direction has two legs in this client, the data subscription and the shutdown notification. A leg passes only when its call completes without an HRESULT.
Arithmetic:
- Forward legs passed: 1 of 1, the connection reported connected before the drop.
- Reverse legs failed: 2 of 2, 0x80070005 on the shutdown hook and 0x8000FFFF on the subscription.
- Time from CONNECTING to FAULTED: 5:15:01 PM minus 5:14:58 PM equals 3 s.
Result: every reverse call between the system account and the interactive user failed within three seconds of startup, while the one forward call succeeded. The boundary between those two identities is the fault.
Decision: when the OPC DA client runs as a service and the OPC server runs under an interactive account, correct the identity mismatch before anything else. Here the service's Log On was set to the WinCC account, the service restarted, the OPCServer.WinCC connection recreated and one tag dropped; the connection held, and no further change was needed.
What not to change first #
- The firewall. It was already disabled in this case and the fault stood. An E_ACCESSDENIED HRESULT is an authorization refusal, not a blocked port.
- Broad DCOM grants. The workaround of allowing remote access for Everyone and Anonymous in the default DCOM settings opens COM activation on that machine to any caller, so leave it off and scope any permission to the two real identities, the client service account and the server account.
- The restart-and-recreate loop. It returns the connection to connected, then faults again at the next drop, because no permission was touched.
- Allow service to interact with desktop. A diagnostic switch of that era, not an authorization fix.
- Batch changes. Change one thing at a time, or a recovery tells you nothing about which change worked.
If you have already been through the DCOM checklist and reads still fail while the connection itself stays healthy, that is a different failure mode, covered in why WinCC OPC data access fails despite DCOM settings.
Verifying the repair #
- After the service restart, the connection reaches connected and holds there through a tag drop.
- One test tag: no error cross, quality no longer "OPC not connected", and the value follows a real change in the runtime.
- The console stays clean at connect: no E_ACCESSDENIED on the shutdown hook and no E_UNEXPECTED on the subscription advise. The client may still note that the server might not support the shutdown hook; what matters is that the advise no longer returns access denied.
- If browsing still errors once the identities match and the connection is recreated, confirm the server's COM registrations, the steps are in checking WinCC OPC registrations after a 7.0 setup.
Questions asked
Why does the connection show connected before the tags fault it?
Connected only proves the forward leg: the client activated the OPC server and browsed its address space. A subscription adds the second leg, where the server calls back into the client, and nothing tests that leg until a tag is actually dropped and the advise is attempted. The status flips at the drop because that is the first moment the reverse path is exercised.
Is 0x8000FFFF on the subscription a defect in the OPC server?
No. E_UNEXPECTED is what COM surfaces when the connection-point advise cannot be established, and published error-code references pair this code specifically with failing asynchronous callback setup. The companion 0x80070005 on the shutdown hook is the access-denied clue: it points at authorization between the two process identities, not at a server defect.
Does running the client and server on one PC avoid all of this?
No. Local communication removes the network, not the security boundary. A Windows service runs under its configured identity and an interactive runtime under the logged-on user, and COM still applies access checks between the two processes. Matching the identities is what removes the refusal; physical locality never did.
Should I grant Everyone and Anonymous remote access in DCOM to make it work?
No. That was an era workaround and it opens COM activation on the machine to any caller. Match the service identity first. If a DCOM change is genuinely needed, grant the minimum access to the two accounts that actually talk, the client service account and the account running the OPC server, and nothing broader.
What is the fastest bench test after the identity change?
Restart the service, recreate the connection, drop one test tag. Pass conditions: the connection holds connected through the drop, the tag shows no error cross, its quality reads good instead of not connected, and the console logs no access-denied or unexpected result on either callback. One tag is enough; a full tag load only hides the result.