Exception: 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 am trying to generate excel file and it is working fine on debugging on visual studio 2015 but as we publish it and run through IIS its start giving this exception...
tried run -> mmc -32 -> component services –> Computers –> My Computer –> DCOM Config and configuration as per many solutions ..
xlApp = new Microsoft.Office.Interop.Excel.Application();
we get exception on this line ... please help ..