ashok.arumugam 0 Newbie Poster

Hi,
I am creating an MS Office Word 2007 Automation application in ASP.NET. Here I will read a predefined .dot(template file) and fill the contents with some dynamics data and save it. I am reading the file from"c:\Documents\Templates\XXX.dot".
1. When I am executing from my VS development application(localhost:portnumber) it is working perfectly.
2. When I am hosting in my same system(Windows XP Professional) by creating virtual directory in inetmgr and executing also working perfectly.
3. My problem occurs where:
When i am hosting the same application in my production server(Windows Server 2008) I am getting error as

Data: System.Collections.ListDictionaryInternal
Message: Word has encountered a problem.
Source: Microsoft Word


The code fails at the below specified line in wordApp.Documents.Add
ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

Document wordDoc = wordApp.Documents.Add(ref oTemplate, ref oFalse, ref oMissing, ref oMissing);

// The code fails at this line.
The above code is called as per the following flow .ASPX Page --> Silverlight(.XAP) file(button click) --> .SVC Web Service --> actual code that raises error written in library(dll) here is where the error is.
I cannot proceed further and i am stuck with his. If anybody came up with this error please help me in solving this issue. I was nearly 2 weeks stuck with this app.

Note: The same automation is working perfectly when i install my windows application(code written in windows application) in Server machine.

Thank you.
Ashok

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.