Last post Mar 15, 2010 11:47 AM by hans_v
Mar 15, 2010 04:46 AM|shilpa_prabhu|LINK
I have created an ASP.Net web application that accessess SQL server database and generates an Excel report (similar to
http://www.beansoftware.com/asp.net-tutorials/generating-excel-reports.aspx). The coe works perfectly when run.
However, when I deploy the code on IIS and try to run the same from another machine using the URL, nothing happens. It doesn't throw and exception but the report does not get generated.
What is the problem? Do I have to provide access to Excel.exe?
Mar 15, 2010 10:45 AM|janctil|LINK
Excel is installed on your server?
Mar 15, 2010 11:47 AM|hans_v|LINK
What is the problem?
That you're using Microsoft.Office.Interop in a web environment!
It's a bad example you're pointing at, because you shouldn't use Microsoft.Office.Interop in a web environment!
"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."