1

I am using Interop.Word version 12 for doing some operation in a word document. My WebService is built in .Net v4.0. The code starts with instantiating an Application object as shown below :

  Application _wordApp = new Application();

which later in the code uses it to create a Word Doc:

 _oDoc = _wordApp.Documents.Add(ref tempFilename, ref _missing, ref _missing, ref _missing);

This is all implemented in a Webservice but the service gets hang in instantiating the Application object itself inside the webmethod .

The WebService works fine in my Dev environment but this issue happens once I deploy the Web Service on Windows Server 2003 which is using IIS 6.0.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
CuriousBuddy
  • 179
  • 1
  • 8
  • 21
  • See http://support.microsoft.com/kb/257757. Short answer, "don't do this". – John Saunders Jun 15 '11 at 19:17
  • possible duplicate of [Getting a Object Reference error in prod only when trying to use the Word DocumentClass](http://stackoverflow.com/questions/5120104/getting-a-object-reference-error-in-prod-only-when-trying-to-use-the-word-documen) – John Saunders Jun 15 '11 at 19:17
  • what do you mean "did not help"? The article is telling you why you can't do this. You should "try" not calling Office Automation from server applications. – John Saunders Jun 16 '11 at 14:37

0 Answers0