Generating Excel report using ASP.NET and C#

46 views
Skip to first unread message

stapes

unread,
Mar 30, 2009, 6:12:17 AM3/30/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
This works OK on my development machine, but when I try to run it on
the live server, I get this error:

System.Runtime.InteropServices.COMException (0x80080005): Retrieving
the COM class factory for component with CLSID {00024500-0000-0000-
C000-000000000046} failed due to the following error: 80080005 at
Web_Reports_KPI.excelKPIS() in c:\inetpub\wwwroot\AGwww\Web_Reports
\KPI.aspx.cs:line 67

Line 67: MyExcel.Application excelApp = new MyExcel.ApplicationClass
();

MyExcel is defined at the top: using MyExcel =
Microsoft.Office.Interop.Excel;

I also have references: Microsoft Excel 12.0 Object Library, Microsoft
Office 10.0 Object Library, Microsoft Office 11.0 Object Libray,
Microsoft Office 12 Object Library, Microsoft.Office.Interop.Word.dll

I have used Component Services / DCOM Config to set permssions for
Microsoft Excel Application. In the Launch and Activation permissions
I have added NETWORK SERVICE and Evereyone. Same for Access Permssions
and Configuration Permissions. Did not make any difference.

Does anyone have any clues?

Stephen Russell

unread,
Mar 30, 2009, 1:30:55 PM3/30/09
to DotNetDe...@googlegroups.com
Office is not loaded on the server?

.........................
Stephen Russell -
Senior Visual Studio Developer, DBA

Memphis, TN
901.246-0159

> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.238 / Virus Database: 270.11.31/2029 - Release Date:
> 03/29/09 16:56:00


stapes

unread,
Mar 31, 2009, 4:36:59 AM3/31/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Server has installed programs:

Microsoft Office 2003 Web Components
Microsoft Office 2007 Primary Interop Assemblies
Microsoft Office Enterprise 2007
> > 03/29/09 16:56:00- Hide quoted text -
>
> - Show quoted text -

Stephen Russell

unread,
Mar 31, 2009, 12:11:35 PM3/31/09
to DotNetDe...@googlegroups.com
I have to kick out a few loader files for another outside app from my site.
I'll give you the steps I used to NOT USE EXCEL on the server!!!!

…………………………………………………………………
Stephen Russell –

Memphis, TN
901.246-0159

> 03/30/09 08:40:00


Tanvir Faraj

unread,
Apr 1, 2009, 10:40:28 AM4/1/09
to DotNetDe...@googlegroups.com
Hi, Stephen is right, as it uses unmanaged code. May be you got issues
with version compatibility. If you really have to use excel you can
try out office web component (owc) which is a bit lightweight.

http://www.codeproject.com/KB/aspnet/OWCAjaxDemo.aspx


Regards.

Reply all
Reply to author
Forward
0 new messages