Search code examples
c#ms-wordms-officeoffice-interop

Word Interop Issue with ASP.NET


About Microsoft.Office.Interop.Word.

I installed the PIA and Microsoft Office 2010 in my web server, but I can't generate a .doc when I run the application published in my web server. When I run my application in localhost, works fine, and generate the .doc file.

I have to do some configuration in server side to allow the generation of .doc files ?


Solution

  • Remember that Office 2010 was not designed to run inside a web server (e.g., thread safety might not be guaranteed), so you might encounter more difficulties down the line.

    Instead, consider using the Open SDK 2.0 from Microsoft, which allows you to manipulate (create, edit) Office 2010 documents, which are simply packaged (zipped) XML files. This technology is much better suited for server use. It also doesn't require you to have a separate Office 2010 license for each web server where you are going to install Office 2010.