Click here to Skip to main content
12,697,076 members (25,700 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB ASP.NET VB.NET
Hi

I'm working on a VB.net web app. I'm generating an Excel workbook dynamically using Interop.Excel.Application. I'm getting a COM Exception
when new instance of Excel.Application is created. I've given access permissions in DCOM Config also. How Can I get rid of this exception?

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).



Please help me.

Thanks in advance,
Vanathi
Posted 9-Dec-10 0:22am
Updated 5-Apr-16 19:36pm
v2
Comments
Slacker007 9-Dec-10 6:29am
   
I shortened the question title because it was too long and because you mentioned the error in your question title and in the body of your question.
prerakpatel 10-Dec-10 4:29am
   
More description required how you configured the security and identity settings.
Bernhard Hiller 23-May-12 3:55am
   
Where do you want to create the Excel workbook - on the Web Server or on the Client?
Philippe Mori 12-Aug-15 13:08pm
   
Office interrop is not designed to run on server. Choose something else like Open XML SDK.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

I had the same error while using the CorelDRAW .tkl in a web app running on IIS 7.5 on my Win 7 64bit machine. I was able to solve it by adding the web user (IUSR) to the CorelDRAW DCOM component and granting local launch and activation permissions. I also had to change the setting under the Identity tab from 'The launching user' to 'The interactive user'.

This article was helpful, but was not written for win 7. http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
  Permalink  
Comments
xellow2 5-Apr-13 13:12pm
   
Hello there, sorry for disturbing you, but i am building similar aplicacion with corel. I am doing an aplication where i use corel in the server side. I did the same as you. But still having that problem. How exactly i have to deploy my aplication using corel. I have windows 7 64 bits, and i know the com corel are 32 bits. Please need your help.
Member 8544310 9-Apr-13 12:13pm
   
It's been a while since I did this, and I am no longer on this project. From what I remember there is both 32 and 64 bit DOM configurations. You may need to figure out what user your application is using to access the file via IIS (it may not be IUSR) and give that user permissions. It may help to change the build of your application - try 32, 64 and mixed to see what works. Also, you will need corel installed on the machine that runs the program. Other that that try different configurations in DCOM until you get it working. Hopefully that is helpful.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 5

1) Run the considered app which the com exception was created on it(e.g your app or VS) as administrator

2) NOT Fixed, check your DCOM settings

1) Run dcomcnfg open Component Services
2) Expand Component Services "->" Computer "->" My Computer "->" the DCOM configuration "
3) Find the "Microsoft Excel application."
4) Right to open the Properties dialog box
5) Click on the "Security" tab,
6) "Launch and Activation Permissions, configure permissions, have opted for a custom
7) Their editing and then click the considered app added to it, and added all the permissions ...

3) Not Fixed, register the excel by regsvr32 or reinstall VSTO

Suggestion:
Use Office Open XML to create your files instead of automation. There are several libraries out there that will help you build Excel files. I personally use EPPlus and think it's pretty decent.
  Permalink  
v4
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 6

Run program "dcomcnfg -32". ( You cant find the word and excel components if it runs under 64bit)
Go to "Console Root/Component Services/Computer/My Computer/DCOM Config/" Look up Microsoft Word and Excel and choose properties.
Go to Security and select "Customize" under "Configuration Permissions. (If needed you might want to change the other permissions as well, but I didn't need to) Add "IIS_IUSRS" and give it "Full Control".

Now go to "Identity" and select "The interactive user".
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

I also got the same error for COM component...

ERROR:
Retrieving the COM class factory for component with CLSID {8885370D-B33E-44B7-875D-28E403CF9270} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).


I tried many of the solutions, i.e. those given above and also some other from msdn site... But finally, this solved the problem..

Opened Visual studio as a normal user (and not as an Administrator).

Mark it if u find this useful.
~~SATZ~~
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 10 Jun 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100