Interop.Word Documents.Open Is Null

object of Interop Word Document Class is null on Windows Server 2008 - Word Open method

ok problem solved thanks for Sameer S post
I just create Desktop folder on server 2008 machine @

C:\Windows\System32\config\systemprofile

And now Its working

And in addition of this as this is ASP.NET app, so I added impersonation check before calling class and its working fine.

Word Documents.Open returns null in ASP.NET windows server 2012 R2

Use an XML library (like ClosedXml) instead of Word Interop.

The most likely reason why it doesn't work via IIS is because Server-side automation of Office is not supported as per https://support.microsoft.com/en-us/kb/257757

Microsoft.Office.Interop.Word error opening the document file in code

Solution to freeze was re-installing Word2003 although I have actually abandoned the approach altogether due to the server issues identified here http://support.microsoft.com/kb/257757. Thanks for all help.

ApplicationClass Documents.Open returns null for ASP.NET site on 64bit system

Using Office interop in a server-scenario (like ASP.NET, Windows Service etc.) is NOT supported by MS - see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

Additionally there have been several security-related changed since Windows Vista which basically make it really hard to do anything "desktop-like" in a Windows Service (IIS/ASP.NET is just a special case of Windows Service in this regard).

There are several libraries (free and commercial) to deal with Office files (without Office Interop)... to help further you need to describe your goal.



Related Topics



Leave a reply



Submit