I have an MVC Web API application using Excel related DLL Microsoft.Office.Interop.Excel
When I run application from VS 2013, it is running under IIS express and I can send Post request to it successfully through RestClient But when I deploy this application to IIS, after sending Post request, it is giving me below error.
Unexpected Error occured while serving your RequestSystem.UnauthorizedAccessException: 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)).
I have Administrator privileges in my machine and I have given all permissions to folder which contains the code. I have also added user IUSR
and given all access to the folder having my code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.