Click here to Skip to main content
15,884,748 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Windows Server 2008 R2. ASP.NET 4.0, Excel 2013. My problem is to programmatically open and access one Excel file stored somewhere in the server. Tried DCOM and IIS permission settings.

Exact Error:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
Posted
Comments
Is Excel installed on the server?
Mr.Sourav.Maitra 10-Jun-14 7:31am    
Yes, it is.
See my answer.
DamithSL 9-Jun-14 13:36pm    
have you set the read permission to IIS_IUSRS or your asp.net site app pool user to your excel file stored folder?
Mr.Sourav.Maitra 10-Jun-14 7:31am    
Yes, that is done

By default web site has a user assigned to it with minimal right, just for running the site itself. For sure instantiating COM/DCOM object is forbidden. And I do not advise you to change the users rights...
In any case you approach seems to me wrong from the beginning. Microsoft offers the VSTO[^] package to handle office files from code, even without Office installed! Go and learn it, than use it for your web application!
 
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