DCOM. I'm sure it sounded like a good idea at the time, but in the real world it generates a lot of headaches. Here's some common DCOM, COM+ and WMI errors along with some fixes. There's also some scripts and registry keys at the end of article to help automate the fixes.
CoCreateInstance Errors
Error: CoCreateInstance for APPLICATION.NAME returned 80070005
Cause: This is an access denied error. Usually this is a result of not being to launch the application on the remote server.
Resolution: You'll need to open Component Services on the remote server/workstation and modify the Access, Launch, and Configuration permissions for the particular application. If you're getting this locally, do the same.
Windows Errors
Error: You do not have access rights to Logical Disk Manager on computer
Cause: This error is the result of incorrect DCOM permissions and/or Windows Firewall settings.
Resolution: Option A If you're connecting to a remote computer, make sure you have port 135 set as an exception on both firewalls. You may also need to add dmremote.exe to the exceptions list.
- Start-->Run, type firewall.cpl and press OK
- Click on the Exceptions and add C:WINDOWS\system32\dmremote.exe and port 135
If that doesn't resolve it, you'll need to add some additional permissions.
- Start-->Run, type dcomcnfg and press OK
- Expand Component Services and then click on Computers
- Right click on My Computer and click on Properties
- Click on the COM Security tab
- Under Access Permissions click on Edit Limits
- Grant ANONYMOUS LOGON the Remote Access permission
- Under Launch and Activation Permissions, click Edit Limits
- Grant Everyone Remote Activation and Remote Launch permissions
- Click OK twice and reboot the computer
Option B If its you're local PC, you'll need to correct the DCOM permissions.
- Start-->Run, type dcomcnfg and press OK
- Expand Component Services and then click on Computers
- Right click on My Computer and click on Properties
- Click on the Default Properties tab
- Set the Default Authentication Level to Connect
- Set the Default Impersonation Level to Identify
- Click OK and reboot
Error: Unable to open Component Services (dcomcnfg). The MMC closes instantly as you expand Computers. This also resolves the Win32: Access Denied WMI error (see Option B above).
Cause: This is a combination of bad DCOM permissions and a messed up COM+ system. Usually this is accompanied by several COM+ errors in the event log.
Resolution: Reinstall COM+ and reset the DCOM permissions. Its a simple process.
- Open a command prompt
- Type ren %WinDir%\System32\Clbcatq.dll %WinDir%\System32\~Clbcatq.dll
- Reboot the computer
- Open regedit
- Delete the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3
- Open a command prompt
- Type cd %windir%
- Type rmdir /s Registration
- Open Control Panel
- Open Add/Remove Programs and then click on Add/Remove Windows Components
- Simply click next to start the reinstall. You may need your Windows CD. If you have IIS installed, run the following command: rundll32 %windir%\system32\inetsrvwamreg.dll, CreateIISPackage
- Reboot the computer
Useful Registry Keys
Reset DCOM Permissions - [HKEY_LOCAL_MACHINESOFTWAREMicrosoftOle]
"EnableDCOM"="Y" "LegacyAuthenticationLevel"=dword:00000002
"LegacyImpersonationLevel"=dword:00000002
Reference Articles
- How to clean up a damaged COM+ catalog - http://support.microsoft.com/kb/315296
- You cannot use the Computer Management feature on a Windows XP SP2-based computer to access Logical Disk Manager on a Windows Server 2003-based computer - http://support.microsoft.com/kb/902430
If you get the error The COM+ event classes could not be registered then do the following:
- REGSVR32 ole32.dll
- After that, reinstall the COM+ event classes with the control panel.
There is a wiki article with mor info if required.