There is no problem in debugging the Excel file exported by Asp.net, but there is a problem in the layout.

Source: Internet
Author: User
Asp.net arranges the Excel File Export program and reports the 80070005 8000401a error Solution
. Net Excel export 80070005 error solution:
An error occurred while retrieving components whose CLSID is {00024500-0000-0000-c000-0000000000000046} in the com class factory because the following error occurs: 80070005 basically. net to export Excel files, you need to configure it like this. If it is not configured, It is correct. However, after the configuration, there should be no errors.
The configuration method is as follows:
1: Install the Excel software for office on the server.
2: Enter dcomcnfg.exe in "start"-> "run" 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.
8. If the error 8000401a occurs after the interactive user is set, you can cancel the interactive user and set it to administratr. This problem can be solved temporarily. Further solutions are to be discussed.
9. After setting, "object reference or link cannot be used" may appear when you open an Excel file, and cell pasting is not allowed. The reason is unknown. The setting will disappear after cancellation.

In addition, simply following the above settings does not completely guarantee that the problem persists, because calling office operations may involve other system resources and may still cause problems due to insufficient permissions, after setting the Excel application, the system may still report a 80070005 error. The most safe thing is to select my computer in dcomcnfg and then right-click Properties> com security to grant the access permission, all the start and activation permissions are edited by default. Add network service (Asp.net user is required for IIS 5.0) to it, and set the same permissions for NetworkService as before, this basically guarantees that no problem will occur.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.