DCOM Error : Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.

When we tried to use word automation from .Net in ASP .Net application earlier it was working but then it stopped working in some of the machine giving error
“Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.”.
We had DCOM setting in place, IIS setting was also ok. Then I got following solution:

  • I changed the AppID Registry key under HKEY_CLASSES_ROOT\AppID\WINWORD.EXE from old entry to {00020906-0000-0000-C000-000000000046}.

(for some it will work after this, but if still its not working go for second.)

  • 2. Also changed the DCOM setting.
    • a. Open the Component Service Console.(Either by running command: dcomcnfg OR by opening it from Control Panel->Administrative Tool -> Component Services)
    • b. Now Select ‘Microsoft Word Document’, Under Component Services->Computers->My Computer -> DCOM Config.
    • c. Do Right click and select Properties.
      it will open Microsoft Word Document Properties dialog.
    • d. In Microsoft Word Document Properties dialog, select Identity tab.
    • e. In Identity tab, if ‘The launching user.’, in our case third option was selected, so we selected 2nd option.

This may solve out problem, hope it would be helpful for you also. If you need to say something please feel free to speak through comments.

 

References:

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/006cbbac-101a-40ea-ae16-d59a7a2da8b1

Published in: on November 3, 2009 at 4:17 pm  Comments (7)  
Tags: , , , , , , ,