One of the company's systems is the Excel export function on the ASP. NET page, which enables an Excel file to be opened on the server.Program, Write data, save it on the server, and then pass it to the client. After the perfect running on XP, a problem occurred when it was officially released to the win2003 server.
Retrieving the com class factory for component with clsid {00024500-0000-0000-c000-000000000046} failed due to the following error: 80070005.
Most of the information on the Internet comes from:Http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
But it seems that the problem cannot be solved.
The final method is as follows:
1: Install the Excel software for office on the server.
2: In "start"-> "run", enter dcomcnfg to start "Component Service"
3: Double-click "component service"> "computer"> "my computer"> "DCOM configuration"
4. In "DCOM configuration", find "Microsoft Excel application", right-click it, and click "properties". The "Microsoft Excel application properties" dialog box is displayed.
5. Click the "ID" tab and select "Interactive User"
6. Click the "Security" tab, click "Custom" on "Start and activate Permissions", and then click the corresponding "edit" button, in the pop-up "security" dialog box, add a "Network Service" user (note that you must select the computer name) and grant it the "local start" and "Local activation" permissions.
7: the "Security" label remains. Click "Custom" on "Access Permissions", and then click "edit ", in the pop-up "security" dialog box, add a "Network Service" user and grant "local access" permission.
In this way, we have configured the corresponding Excel DCOM permissions.
At this point, my problem seems to have not been solved.
There are two more notes:
First, if you are running onWindows 2003 ServerYou must enter the account thatApplication poolIs running as, by default"NETWORK SERVICE"
Second, you can add <identity impersonate = "false"/> between <system. Web>.
At this point, the solution should be perfect. Note that the environment is windows2003.