Failed to retrieve component with CLSID {00024500-0000-0000-c000-000000000046} in COM class factory

Source: Internet
Author: User

A Web project was released today, and the Excel component was used in the project, and there was a problem when exporting excel in the developed Web site:
Failed to retrieve a component of the CLSID {00024500-0000-0000-c000-000000000046} in a COM class factory because of the following error: 80070005.

Sometimes the error message may be:

Retrieving a component in a COM class factory with a CLSID of {000209ff-0000-0000-c000-000000000046} failed because of the following error: 8000401A. The error.


After a while, the result is that Excel COM components error when exporting records as Excel tables, but running in the development environment without any problems, so the conclusion is that it must be a permission problem, check the information, solve the problem.

The specific solution is as follows:

1: Install Office Excel software on the server, add an account to the server, and set the Administraotrs, Power user or user

2: Enter Dcomcnfg.exe in Start, run, start Component Services

3: Double-click "Computer", "Component Services", "My Computer", "DCOM Configuration"

4: Locate "Microsoft Excel Application" in "DCOM Config", right-click on it, and then click "Properties" to eject "Microsoft Excel should

Using the Program Properties dialog box

5: Click on the "Logo" tab, select "Specific user", then enter the account number and password that you created earlier.

6: Click on the "Security" tab, click "Customize" on "Launch and Activation Permissions", then click on the corresponding "edit" button, add a "NETWORK SERVICE" user in the "Security" dialog box (note To select this computer name) and give it "local launch" and "Local activation" Permissions.

7: Remain the "Security" tab, click "Customize" on "Access", then click "Edit" and add a "NETWORK SERVICE" user to the "Security" dialog box that appears, then give "Local access" permission.

This allows us to configure DCOM permissions for the corresponding Excel.

Note: This is configured on WIN2003 and on 2000,XP, the NETWORK service user is changed to an ASP. (If this account does not solve the problem, please add the Everyone user)

Finally, add a fulcrum 〈identity username= "xxx" password= "xxx" in the <system.web> of the Web. config profile of the site/〉 (userName, Passwors, Is the account created between us)


(basically 1-7-step operation will solve the problem)
--------------------------------------------------------------------------------------------------------------- --
8. With the 5th "specific user" setting, opening Excel may cause "cannot use object references or links" and cell pasting is not possible. The cause is unknown, and it disappears after you cancel the setting.

In addition, light in the above settings does not guarantee that there is no problem, because the operation of the call office may involve other system resources, it is likely still insufficient permissions to cause problems, but after setting up the Excel application, still may report 80070005 error, The safest thing to do is to select My Computer in DCOMCNFG and then right-click on the property->com security, the access permissions, the launch and activation permissions are all edited by default, in addition to the Network Service (IIS 5.0, add an ASP. NET users), And as before face NetworkService set on the same permissions, so basically can guarantee no more problems.

Registration method Execution starts----run----Enter the installation path for excel2003, such as "C:\Program Files\Microsoft Office\office11\excel.exe"/RegServer note/symbol preceded by a Spaces, where "C:\Program Files\Microsoft Office\office11\excel.exe" is the path of the excel2003 installer, the parameter regserver means registered!
After running, the Office 2003 Setup program is started, repaired, and re-registered.
EXCEL2007 is the default way to start a program, you can perform a start----run----"D:\Program Files\Microsoft Office\office12\excel.exe"/RegServer
In summary, and then encountered Excel export, import issues, first consider the permissions issue, and then consider the version of Office environment! That basically solves these problems.
Original address: http://www.cnblogs.com/andy1016/archive/2010/02/21/1670498.html

--------------------------------------------------------------------------------------------------------------- --

The problem is that on a 64-bit version of the machine, you may not find the item "Microsoft Excel application " After you open DCOMCNFG, because DCOMCNFG is a 32 configuration and can be fully supported under 64-bit systems, so it is just guacai.

The way to open the 32-bit DCOMCNFG is then read:

1. Run: mmc-32

2. Open "File"-"Add or remove Snap-in"-Select Component Services-click Add-OK.

3. Microsoft Excel application can be found in the DCOM component.

Sometimes, it is possible to configure the top-most way to complete, run the site, the same error.

Check again and the content is not finished setting.

Check the settings of the IIS7, and finally determine that you also need to set the identity of the application pool, the AppPool of this site to be set to LocalSystem or NetworkService, problem resolution.

Original address: http://www.cnblogs.com/petitprince/archive/2010/08/20/1804360.html

Failed to retrieve component with CLSID {00024500-0000-0000-c000-000000000046} in COM class factory

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.