Community discussion forum

ASP.NEt and Com Interop on server

  • 1 year ago

    I'm developing a ASP.NET web application which opens a word templates makes changes to it and shows the word document to the user.
    The functionality is implemented by using a reference to the COM Microsoft.Word 11 Object
    library,

    When I publish the website and add the interop assembly to the bin directory
    and deploy it to server (without office 2003) the word
    functionality generates an error:

    Retrieving the COM class factory form the component with CLSID
    {000209FF-0000-0000-C000-000000000046} failed due to the following error:
    80040154.

    In other words: Component not registered.

    I don't want to install Office 2003 to my server! But how do I implement the
    Word functionality using the Interop Assembly and without
    installing Office 2003 on the server?

    Also I read that it is not recommended to use COM interop with office on server. Are there any specific reasons for this?

     

    Thanks 

     

  • 1 year ago

    I'm afraid that's not possible. The interop assembly simply acts as a go-between for your .NET code and the world of COM. It still needs the Word libraries sitting there on the server in order to work.

    The reasons that it's not recommended I imagine are purely performance reasons - if you're essentially loading up an instance of word in the background to create your document, you'll rapidly run out of server resources if you app is heavily used.

    Hope that helps!

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!