I have an Asp.net mvc application which is using Excel in many views for generate reports. While I am working in local machine at that time it's working fine. After that when I publish it to IIS server I was getting error like 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)).
which I have solved using following steps :
--> First of all I have changed Application Pool property like Enable 32-bit Application = TRUE and Identity = LocalSystem and then following below
Step 1 : Create directory “C:\Windows\SysWOW64\config\systemprofile\Desktop ” (for 64 bit Windows) or “C:\Windows\System32\config\systemprofile\Desktop ” (for 32 bit Windows)
Step 2 : Set Full control permissions for directory Desktop (for example in Win7 & IIS 7 & DefaultAppPool set permissions for user
“IIS AppPool\DefaultAppPool”
Now when I have host my application on SmarterASP then again I am getting that error in live environment. So in live how can I solve this error so excel can work perfectly without any trouble ?
User contributions licensed under CC BY-SA 3.0