Microsoft.Office.Interop.Excel put to B/s client failure retrieving a component in a COM class factory that has a CLSID of {00024500-0000-0000-c000-000000000046} failed because the following error occurred : 80070005 access Denied.

Source: Internet
Author: User
Tags microsoft access database

retrieving a component of the CLSID {00024500-0000-0000-c000-000000000046} in a COM class factory failed because of the following error: 80070005 access denied. (Exceptions are from hresult:0x80070005 (e_accessdenied)).

Workaround: (EXT)

http://blog.csdn.net/wzhibin/article/details/1816690

In. Net wrote a related Excel b/s program, deployed to 2003 Enterprise Edition of the server encountered this error: Retrieving a COM class factory in the CLSID {00024500-0000-0000-c000-000000000046} component failed, The following error occurred because: 80070005. Search on the Internet, find a solution, and paste it over to the memo. Http://www.cnblogs.com/PiedPiper/articles/627764.html then everything is fine. Unexpectedly two days, suddenly the mistake appeared again. Check the permissions, no problem ah, really fainted. A friend on the internet suggested that it would be nice to pack SP1 patches. But I've already patched it. The Final Solution: based on: http://www.cnblogs.com/HQT/archive/2006/05/22/406345.html do the following: 1. Open Excel, press ALT + F11, and close Excel and Vba;2. Click Start, click Run, and then type Dcomcnfg;3. Click on Component Services-computer-My Computer-dcom configuration, then pop up a question registration window to confirm the registration. Then everything returned to normal, do not have to go down. Oh alas .... Microsoft Office's kernel is too old, the problem is much

The specific solution is as follows:

1: Install Office Excel software on the server.

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 and select "Interactive User"

6: Click on the "Security" tab, click "Customize" on "Launch and activation Rights", then click on the corresponding "edit" button to add the "Security" dialog box.

A "NETWORK SERVICE" User (note to select the computer name) and give it the "local launch" and "Local Activation" permissions.

7: Remain the "Security" tab, click "Customize" on "Access", then click "Edit" and add a "NETWORK" in the "Security" dialog box that pops up.

SERVICE user, and then give the local access permission.

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

Note: This is configured on WIN2003, on 2000, it is possible to configure the ASPNET user

Because Excel is open on the server, you should write a method that saves the exported data on the server and then passes it to the client, and the last tune

Use this feature to remove any previously generated Excel from the server

An error occurred while creating the EXCEL application:

Failed to retrieve a component of the CLSID {00024500-0000-0000-c000-000000000046} in a COM class factory because of the following error: 80070005

Workaround: Configure the DCOM EXCEL application:

To set up an Office Automation server under an interactive user account, follow these steps:

1. Log on to the computer as an administrator and use the full installation to install (or reinstall) Office. To achieve system reliability, it is recommended that you copy the contents of the Office CD-ROM to a local drive and install Office from this location.
2. Start the Office application that you want to run automatically. This will force the application to register itself.
3. After you run the application, press ALT+F11 to load the Microsoft Visual Basic for Applications (VBA) editor. This forces VBA to initialize.
4. Close the application, including VBA.
5. Click Start , click Run , and then type DCOMCNFG. Select the application that you want to run automatically. The application name is as follows: Microsoft Access 97-microsoft Access database
Microsoft Access 2000/2002-microsoft Access application
Microsoft Excel 97/2000/2002-microsoft Excel application
Microsoft Word 97-microsoft Word Basic
Microsoft Word 2000/2002-microsoft Word document Click Properties to open the Properties dialog box for this application.

6. Click the Security tab. Verify that the default access permissions are used and that the default startup permissions are selected.
7. Click the Identity tab, and then select Interactive User .
8. Click OK to close the Properties dialog box and return to the main application List dialog box.
9. In the DCOM Configuration dialog box, click the Default Security tab.
10. Click Edit Default value for access permissions. Verify that the following users are listed in the access permission, and if they are not listed, add these users: SYSTEM
INTERACTIVE
Everyone
Administrators
Iusr_<machinename>*
Iwam_<machinename>*

* These accounts exist only if Internet information Server (IIS) is installed on the computer.
11. Make sure that each user is allowed access, and then click OK .
12. Click Edit Default for launch permissions. Verify that the following users are listed in the startup permissions, and if they are not listed, add these users: SYSTEM
INTERACTIVE
Everyone
Administrators
Iusr_<machinename>*
Iwam_<machinename>*

* These accounts exist only if IIS is installed on the computer.
13. Make sure that each user is allowed access, and then click OK .
14. Click OK to close DCOMCNFG.

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.