Fix CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT (0x80004024)
This error means COM+ can't create an object in the right security context. The fix is resetting COM+ permissions and the default activation security.
You're not alone — this error is a pain
You try to launch a COM+ application or a DCOM object, and bam — error 0x80004024 pops up with the message about failing to create outside the client context. It usually hits when you're running a legacy app, a custom COM+ component, or something tied to IIS on Windows Server 2016, 2019, or Windows 10/11. The real cause? A mismatch between the identity under which the COM+ app runs and the caller's security context. Let's fix it.
The fix: reset COM+ default activation security
This fix works in 9 out of 10 cases. It resets the COM+ machine-wide security settings back to defaults. Don't skip any step — I've seen people miss one and come back with the same error.
- Open Component Services. Press Win + R, type
dcomcnfg, and hit Enter. You'll see the Component Services console open. - In the left pane, expand Component Services > Computers > right-click My Computer and choose Properties.
- Click the COM Security tab. This is where the magic happens.
- Under Access Permissions, click Edit Default. A permissions window opens.
- In that window, check the list. You should see these groups:
- Everyone — set to Allow for both Local Access and Remote Access.
- SYSTEM — same, both Allow.
- Administrators — both Allow.
- Interactive User (or INTERACTIVE) — both Allow.
- Back on the COM Security tab, under Launch and Activation Permissions, click Edit Default.
- Same deal here. Make sure these groups have both Local Launch, Remote Launch, Local Activation, and Remote Activation set to Allow:
- Administrators
- SYSTEM
- Everyone
- INTERACTIVE
- Now click the Default Properties tab. Make sure Enable Distributed COM on this computer is checked. Also set Default Authentication Level to Connect (not None, not Packet — Connect is the sweet spot). Set Default Impersonation Level to Identify.
- Click Apply, then OK. Close Component Services.
- Restart your computer. I know, it's annoying, but COM+ caches these settings until reboot. Don't skip this.
After the restart, try the action that triggered the error. In most cases, the 0x80004024 error is gone.
Why this works
The error means the COM+ runtime tried to create an object but the security context it ran in didn't match what the caller expected. It's like showing up to a meeting with the wrong badge — the system says "you can't create that object here." By resetting the default launch and access permissions to include Everyone and INTERACTIVE, you're telling COM+, "any logged-in user or system process can create this object." That gets rid of the mismatch. The Authentication Level of Connect ensures only initial call is authenticated, which is enough for most apps. Identify impersonation means the server can see who you are but can't act as you — keeps things secure but flexible.
If that didn't work: check the specific COM+ app identity
Sometimes the machine-wide defaults are fine, but a specific COM+ application has its own identity settings that override them. Here's what to check:
- In Component Services, expand Component Services > Computers > My Computer > COM+ Applications.
- Find the application that's failing. Right-click it and choose Properties.
- Go to the Identity tab. You'll see one of two options:
- Interactive user — This runs the COM+ app under the currently logged-in user. If the user context doesn't have permission to create the object, you get the error.
- This user — A specific service account. If that account's token doesn't have the right privileges, same problem.
- Switch to Interactive user temporarily for testing. If the error goes away, you know the issue is the account. Then set it back to This user and make sure that account has the proper permissions (log on as a service, access to the necessary files, etc.).
- Also check the Security tab for that same COM+ app. The authorization levels set here can override the machine defaults. For testing, set Authorization to None (or uncheck "Enforce access checks for this application").
Another less common cause: corrupt COM+ catalog
If neither of the above works, the COM+ catalog itself might be corrupted. This is rare, but it happens after a bad update or registry cleaner gone rogue. Here's the nuclear option:
- Open an elevated Command Prompt (right-click Start > Command Prompt (Admin)).
- Run these commands one at a time:
net stop comsysapp net stop eventlog cd /d %windir%\system32\com regsvr32 /u comadmin.dll regsvr32 /u comsvcs.dll regsvr32 /u comdu.dll regsvr32 comadmin.dll regsvr32 comsvcs.dll regsvr32 comdu.dll net start comsysapp net start eventlog - Reboot. This re-registers all core COM+ DLLs. It doesn't delete any apps, just refreshes the system files.
Prevention tips
This error usually shows up after an app install, a Windows update, or someone tinkering with security settings. To avoid it coming back:
- Don't change COM+ security defaults unless you have to. I've seen admins lock down "Everyone" to prevent access, then break a dozen apps. If you must change them, document what you changed and test every app.
- Use dedicated service accounts for COM+ apps, not Interactive User. Interactive User fails when no one is logged in (like after a reboot). Create a domain or local service account with minimal rights and use that in the Identity tab.
- Run the Component Services dcomcnfg tool after every Windows feature update. Sometimes updates reset the defaults — or corrupt them. Just open, glance at the COM Security tab, and make sure your entries are still there.
- Don't use registry cleaners. They love to delete COM class entries that look "orphaned" but are actually needed. That's a one-way ticket to 0x80004024 and worse.
That's it. Go ahead and run through these steps. 0x80004024 is stubborn but not permanent. You'll have it fixed in ten minutes flat.
Was this solution helpful?