I have an MVC Web API application that uses an Excel-related DLL. Microsoft.Office.Interop.ExcelWhen I run the application from VS 2013, it runs under IIS express and I can successfully send a send request through RestClient. But when I deploy this application in IIS, after sending the send request, it gives me the error below.
An unexpected error occurred while servicing your RequestSystem.UnauthorizedAccessException: retrieving the factory COM class for a component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
I have administrator rights on my computer, and I gave all permissions to the folder containing the code. I also added the user IUSRand gave all access to the folder that has my code.
source
share