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
How to Inject JavaScript in The Wp7 Webbrowser Control
How Does Garbage Collection and Scoping Work in C#
What Is the Fastest Way to Compute Sin and Cos Together
Webbrowser Control and JavaScript Errors
Secure Way of Inserting Dynamic Values in External JavaScript Files
Why Would C# Processstartinforedirectstandardoutput Cause Xcopy Process to Fail
Most Efficient Way to Append Arrays in C#
How Get List of Local Network Computers
Instantiating a Python Class in C#
Visual Studio C# Intellisense Not Automatically Displaying
How to Evaluate Expression Whilst Debugging
Windows Phone 8: Media File Access
Use an Async Callback with Task.Continuewith
Multiple Insert Statements in One Connection
Return Contents of a Std::Wstring from C++ into C#
Should I Use Mkannotation, Mkannotationview or Mkpinannotation
How to Code a Progress Bar for Windows 7 to Also Update Itself on the Taskbar