I have a problem in deploying an ASP.NET web project with Microsoft.Interop.Word.
From the developing PC, my program opens a Word template, replaces bookmarks with some text from the web page and then saves and closes the file. As many others say, it works fine from the developing PC but when I try to put is on the web server, it fails with the error:
- - - - - -
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.
Source Error:
Line 185: Dim word As New Microsoft.Office.Interop.Word.Application
Line 186: Dim wobj As Microsoft.Office.Interop.Word.Document
Line 187:
- - - - - - -
The server is running Windows Server 2003. I have tried setting the DCom permissions (on the component labeled My Computer) so that the ASPNET, INTERACTIVE and NETWORK SERVICE accounts have Launch and Activation permissions. I have also gone to the Microsoft Document component under DCom and added the same permissions. My DCom settings for the Word document are to run as Interactive User, authentical level to “Connect”, Location to “Run application on this computer”. I have tried adding permissions to the Assembly folder underneath Windows and have checked the registry to ensure that DCom was enabled.
I’m really at a loss here. Does anyone have any suggestions? This ran flawlessly when it was deployed on a Windows 2000 server back in the fall.
From the developing PC, my program opens a Word template, replaces bookmarks with some text from the web page and then saves and closes the file. As many others say, it works fine from the developing PC but when I try to put is on the web server, it fails with the error:
- - - - - -
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.
Source Error:
Line 185: Dim word As New Microsoft.Office.Interop.Word.Application
Line 186: Dim wobj As Microsoft.Office.Interop.Word.Document
Line 187:
- - - - - - -
The server is running Windows Server 2003. I have tried setting the DCom permissions (on the component labeled My Computer) so that the ASPNET, INTERACTIVE and NETWORK SERVICE accounts have Launch and Activation permissions. I have also gone to the Microsoft Document component under DCom and added the same permissions. My DCom settings for the Word document are to run as Interactive User, authentical level to “Connect”, Location to “Run application on this computer”. I have tried adding permissions to the Assembly folder underneath Windows and have checked the registry to ensure that DCom was enabled.
I’m really at a loss here. Does anyone have any suggestions? This ran flawlessly when it was deployed on a Windows 2000 server back in the fall.