when i run my code on local, no problem.. but when i run my code on the server, i take this error:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
it gives the error in this line:
excelObj = new Microsoft.Office.Interop.Excel.Application();
this is description:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Source Error:
Line 169: Microsoft.Office.Interop.Excel.Workbook workbook = null;
Line 170:
Line 171: excelObj = new Microsoft.Office.Interop.Excel.Application();
Line 172:
Line 173: System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
is this error related to my code or my server?
thanks in advance..