How to register Interop.Microsoft.Office.Interop.Word.dll in server environment? RRS feed

  • Question

  • User1793516069 posted

    I have a webapp that uses interop.word dll to programmatically write to a file.  The app works fine when run on my local machine, but generates an error when run on the server.   The error is:

    System.Runtime.InteropServices.COMException (0x80040154): COM object with CLSID {000209FF-0000-0000-C000-000000000046} is either not valid or not registered. 

    So I try to register the DLL on the server.  When I use regsvc, I get an error: "No ServicedComponent-derived classes were found in the assembly...")

    So I try to register the DLL on the server using regasm.  That works fine, but when I try to run the app, I still get the COMException from above.

    I'm using  Microsoft Visual C# .NET   69461-335-0000007-18131 with .Net 1.1 (yeah, I know - we're upgrading soon...)

    Is there something else I need to do to get this DLL registered correctly on the server?

    Thanks much,




    Wednesday, August 27, 2008 12:42 PM

All replies

  • User-1573490007 posted

    Pretty much, as far as I know, you should be installing Office on the server. There may be other ways, I'm sure, but keep in mind you need a valid MS Office license for the server if you do this... these DLLs aren't free =P

    Wednesday, August 27, 2008 1:47 PM