Click here to Skip to main content
15,860,859 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?

SQL
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
Updated 5-Apr-16 18: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.
Prerak Patel 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.

SQL
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
 
Share this answer
 
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.
John David Meyer 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.
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.
 
Share this answer
 
v4
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".
 
Share this answer
 
v2
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~~
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900