Error -2147024891 (0x80070005) Access Denied launching DIAdem
During Spartan startup, and error is encountered when opening a connection to National Instruments DIAdem. The error code -2147024891 is written to the Spartan event log, and indicates that a Windows General Access Denied error has occurred. Spartan server cannot continue running once this error has occurred (NOTE: If Spartan is installed as a service, the application ceases to run, however the service continues to run and must be stopped before a restart can occur).
The operating system has a restricted security level set, which is keeping the Spartan application from communicating with a required ActiveX component. This DCOM object is used to allow Spartan to interact with the DIAdem application from National Instruments (www.ni.com). The effected DCOM system objects are DIAdem.ToCommand, and DIAdem.ToDataSheet.
NOTE: Because this error is the result of security restrictions, the communication failure is not limited to the Spartan application. Additional applications which attempt to access the same component will experience similar difficulties. This can be verified by running the following Visual Basic Script (ToCommand.vbs.unsafe). If security permissions are configured properly, this script will launch the DIAdem application, and display a dialog with the text "Hello", otherwise it will fail with an error code similar to the Spartan code above.
To resolve this issue, the system security restrictions must be modified to allow adequate permissions for inter-process communications. The following security settings can be checked by a system administrator.
- Verify local system and group policy settings. These settings must be confirmed by a qualified system administrator.
- System policies must be set to allow Spartan to communicate with the ActiveX components.
- Hosted Installations - Spartan is running as a service controlled by the LOCAL SYSTEM account. Unless specifically denied, this account's default permissions allow full access for DCOM interactions
- Stand-Alone Installations - Spartan is running under a user account. This account should have adequate privilages allotted in the system policy to allow both "Local Launch" and "Local Activation" of DCOM components.
Note: For debugging purposes, this problem can be duplicated by explicitely denying access through these policies. This test should ONLY be performed on a test machine, NOT on a production machine.
- Use Microsoft's dcomcnfg utility (Start > Run > "dcomcnfg") to confirm object permissions for the ActiveX objects in question (DIAdem.ToCommand and DIAdem.ToDataSheet).
- Hosted Installation - The SYSTEM account requires privilages to CREATE, READ, and WRITE to these objects.
- Stand-Alone Installation - The user account being used to run Spartan must have privilages to CREATE, READ, and WRITE to these objects.
If all security settings have been confirmed, it is possible that the DCOM components must be reinstalled to the system to properly reset security settings. To do this, the DIAdem installation must be repaired, or reinstalled.
The DCOM Access Denied error will completely prevent Spartan from running on a target system. If the error cannot be resolved using the above techniques, it is possible that the target system is corrupted. If system corruption is encountered, it is recommended to attempt the installation on another system within the company domain to verify the problem does not exist within security policy settings.
dcom : activex : system : permissions : security : diadem