For IIS server, you must first install the Excel Development Kit and. Net programmable support.
Failed to retrieve components whose CLSID is {00024500-0000-0000-c000-000000000046} in COM class factory
The final solution to an error in the Microsoft Excel application DCOM component called in ASP. NET is as follows:
1: Enter dcomcnfg.exe in "start"-> "run" to start "Component Service"
2: Double-click "component service"> "computer"> "my computer"> "DCOM configuration"
3. In "DCOM configuration", find "Microsoft Excel application" (Microsoft Excel application), right-click it, and click "properties ", the "Microsoft Excel application properties" dialog box is displayed.
4: click the "ID" tab and select "Interactive User"
5. Click the "Security" tab, click "Custom" on "Start and activate Permissions", and then click the corresponding "edit" button. In the displayed "security" dialog box, enter
A "Asp.net" user (note that you must select the computer name), and grant it the "local start" and "Local activation" permissions.
6: the "Security" label remains. Click "Custom" on "Access Permissions", and then click "edit ", in the pop-up "security" dialog box, add an "Asp.net", (everyone or network service) user, and then grant the "local access" permission.
7. Click "location" and select the computer on which the data resides to run the program and the computer on which the data resides to run the program.
In this way, we have configured the corresponding Excel DCOM permissions.
Note: This is configured on WINXP. On 2003, The Asp.net user is changed to the network service user.
Restart IIS. You can solve the problem.
If the problem persists, change the interactive user to the administrator user.