Reputation: 59
I have IIS7(Windows Server 2008) 64bit but my application is running in 32bit mode. Ms Office 2003 is installed on server. I cannot find {000209FF-0000-0000-C000-000000000046} in Component Services but I can see {00020906-0000-0000-C000-000000000046} and I assigned all permissions for it too.
If I apply impersonation then I see winword.exe*32 in task manager and page in progress for long long time just like stick, no response/ error. I noticed that page goes stick/always in progress with
'' Passed and no error with impersonation
Dim WordApp As Microsoft.Office.Interop.Word.Application = New Microsoft.Office.Interop.Word.Application
'' Passed and no error with impersonation
Dim objDoc As Microsoft.Office.Interop.Word.Document = New Microsoft.Office.Interop.Word.Document
'' With impersonation, this line of code stick page to long process - Documents.Open
objDoc = WordApp.Documents.Open(path)
What I am missing? Same code was working with Windows Server 2003 64 bit.
Upvotes: 0
Views: 2273
Reputation: 127603
Office Interop is not designed for sever side use. Microsoft has a Knowledge Base article on the topic of server-side automation of Office, you may want to read though it.
Without knowing what you are trying to use the interop for, all I can recommend is switch to using Office OpenXML for your sever automation. If you are just doing document manipulation it should allow you to do that. For anything else I would recommend looking over the suggestions for alterintives in the KB article I linked.
If you really must there is a hack solution to your problem
if you create the folder C:\Windows\SysWOW64\config\systemprofile\Desktop
and C:\Windows\System32\config\systemprofile\Desktop
it may solve your problem, but if you can I would highly recommend using OpenXML instead.
Upvotes: 3