E_ACCESSDENIED

Access Denied

Beckhoff · TwinCAT 2 Automation Interface

What does E_ACCESSDENIED mean?

The operation failed due to insufficient permissions or a locked resource. This occurs if the current document in the system manager instance is locked (e.g., when calling NewConfiguration() or OpenConfiguration()) because a reference to the system manager's object or a tree element is open. For DeleteChild(), it indicates that deleting the child item is not allowed due to protection or operational constraints.

Additional Steps

Steps 1–2 are listed in Priority Fix.

  1. 3

    Check user permissions in the operating system and TwinCAT security settings to ensure write access.

  2. 4

    Ensure the specific child item is not protected or actively in use by another TwinCAT process before attempting to delete it.

Source: Beckhoff TwinCAT 2 Automation Interface
Open Manual (Page 31)