I have a website written by MVC C# (Visual studio 2010). I use Microsoft Excel 2007 COM to export some data to excel file and then send it to web client. (Because the excel file is kinda complex so I didn’t use OpenXML)
Every thing is OK when I run debug code at my local computer. But when I try to deploy the website to IIS server (server has been installed Office 2007 and visual 2010 also), the export functionality doesn’t work at all. Even excel process doesn’t start when request from client comes. Other else functions are run very nice but Excel related.
Please help me to find what is the problem and how can I get over this.
Thanks in advance!
P.S. Debug local on server is done successfully with the same result when debug on my local PC.
You shouldn’t be automating Office applications from a asp.net application:
http://support.microsoft.com/kb/257757
“Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.”