Serious problem to use Excel component in ASP.NET application

Posted by Abhiigate under ASP.NET on 2/20/2012 | Points: 10 | Views : 1697 | Status : [Member] | Replies : 5
Hello,
I am getting serious problem while using Excel library in to asp.net application.
I am excel document from asp.net application.
i have added .net interop 12.0 excel library reference into application.
on local everything is working fine. but when i publish the application on server(server 2003) getting following problem.

"Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005."
- added network service
- added aspnet user

I have done all dcomcnfg setting as per suggested by google docs after serched the error in google.

but still i am getting above error. trying to solve this problem from last 3-4 days. but not found any correct solution.

following is my code.

app = new Excel.Application();
app.Visible = false;
workbook = app.Workbooks.Add(1);
worksheet = (Excel.Worksheet)workbook.Sheets[1];

on server we have MS Office 2007.
IIS 6.0

Please help me.

Software Developer


Responses

Posted by: Hmanjarawala on: 2/20/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi abhi,

This is clear cut case of versioning...
your interop version doesn't match with server interop version.
plz check which interop version server has....and add reference accordingly.

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Abhiigate, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhiigate on: 2/20/2012 [Member] Starter | Points: 25

Up
0
Down
Thanks Hmanjarawala. for your quick reply.

I checked with the same but there is no issue with interop version and reference added. on server we have ms office 2007 and also we have used interopn version 12.0 dll.

also tried with 11.0. but getting same error.

Software Developer

Abhiigate, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blueskysinger on: 2/20/2012 [Member] Starter | Points: 25

Up
0
Down
Barcode scanning is a hot topic these days. And loads of barcode apps are available to use online. Among them, KEEPAUTOMATION ASP.NET barCode Reader is a good one.You may have a try.
http://www.keepautomation.com/guide/aspnet_barcode_generator.html

Anna White

Abhiigate, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhiigate on: 2/22/2012 [Member] Starter | Points: 25

Up
0
Down
Hello I am still not got any solution. plz help me it's urgent.


i am using that interop reference into the DLL. and getting that DLL into application at runtime using Reflection.
i have placed the interop dll into bin folder and then published the site. but still it searching the system dll which is not getting and throwing error "Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005."

Plz let me know how to call interop dll from bin folder?

Software Developer

Abhiigate, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Daisywhite on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
Sorry for nothing to do a barcode generator for excel might be helpful http://www.keepautomation.com/products/excel_barcode/linear_barcodes.html

Abhiigate, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response