简体   繁体   中英

Is Office 2003 interop supported on Windows server 2008 ..?

I am getting below error while trying to run an interop dependent program on Windows server 2008 its running fine on Win Server 2003 and XP:

System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC at Microsoft.Office.Interop.Excel.WorkbookClass.SaveAs(.......)

According to Microsoft, Windows Server 2008 is not in list of suppoerted OS.

http://www.microsoft.com/downloads/en/details.aspx?familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en

System Requirements

Supported Operating Systems:Windows 2000 Service Pack 3;Windows Server 2003;Windows XP

Can anybody please confirm this.. has anyone tried it ..?

Found Answer.......!!!!!!!

Officially Microsoft Office 2003 Interop is not supported on Windows server 2008 by Microsoft.

But after a lot of permutations & combinations with the code and search, we came across one solution which works for our scenario.

The solution is to plug the difference between the way Windows 2003 and 2008 maintains its folder structure, because Office Interop depends on the desktop folder for file open/save intermediately. The 2003 system houses the desktop folder under systemprofile which is absent in 2008.

So when we create this folder on 2008 under the respective hierarchy as indicated below; the office Interop is able to save the file as required. This Desktop folder is required to be created under

C:\\Windows\\System32\\config\\systemprofile

AND

C:\\Windows\\SysWOW64\\config\\systemprofile

This worked for me...

  1. Also do check if .NET 1.1 is installed because its needed by Interop and ot preinstalled by Windows Server 2008

  2. Or you can also Use SaveCopyas() method ist just take onargument as filename string)

Thanks Guys..!

.NET 1.1也是一个要求,我不认为Windows Server 2008上有此要求(仅我个人认为,实际上不应该如此),这可能是您的问题。

Well, in general, running interop on any server is usually not a good idea, since Office is not made to be part of a server solution. However, assuming that you can't change that, it should be possible to get it to run, but I have seen a lot of problems having various issues but the solutions seems to be different for different people.

This stackoverflow question has some answers, some of which might help you (it's about Win7, but it should still be relevant I'd think).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM