Search for CLSID in the com class factory ..." Solution to two errors 111111

Source: Internet
Author: User
How to retrieve two errors of CLSID... in COM class factory

Develop read 206 Comment 1 Font size: Large LargeMedium MediumSmall Small

Recently, I used. Net to write a B/S program related to excel. This error occurs when I deploy it on the server of 2003 Enterprise Edition:
Failed to retrieve components whose CLSID is {00024500-0000-0000-c000-000000000046} in the com class factory because of the following error: 80070005.

Search for the solution on the Internet and paste it to your notes.
Http://www.cnblogs.com/PiedPiper/articles/627764.html

Then everything works. I did not expect that after two days, a sudden error occurs again. Check permissions. No problem. It's just a faint.

A friend on the Internet suggested installing the SP1 Patch. But I have already installed patches.

The final solution:
Basis: http://www.cnblogs.com/HQT/archive/2006/05/22/406345.html
Perform the following operations:
1. Open excel, press Alt + F11, and close Excel and VBA;
2. ClickStart, ClickRunAnd then type dcomcnfg;
3. Click "component service"> "computer"> "my computer"> "DCOM configuration". A dialog box is displayed, indicating "register.
In this case, everything is back to normal and you do not need to perform any further operations. Haha

 

 

There was no problem in vs2005, so I came to the conclusion that it was definitely a permission problem. I checked the information and solved the problem.

The solution 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: Find "Microsoft Excel application" in "DCOM configuration", right-click it, and then click "properties ".

Application Properties dialog box

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 displayed "security" dialog box, enter

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 is still displayed. Click "Custom" on "Access Permissions", and then click "edit". In the displayed "security" dialog box, add a "network"

Service, and then grant the "local access" permission.

In this way, we have configured the corresponding Excel DCOM permissions.

Note: This is configured on win2003. on 2000 and XP, the network service user is changed to Asp.net.

 

 

 

This problem has plagued me for several days, and it took me more than a day to go over it.

ConfigurationDCOMMediumExcelApplication:
To be set under an Interactive User AccountOfficeFor automated servers, follow these steps:
1.Log on to your computer as an administrator and use the full installation method to install (or reinstall) The office. To achieve system reliability, we recommend that youOfficeCD-ROMCopy content to the local drive and install it from this locationOffice.
2.StartOfficeApplication. This forces the application to register itself.
3.After running the application, followAlt + F11To loadMicrosoftVisualBasicForApplications(VBA)Editor. This will forceVBA.
4.Close the application, includingVBA.
5.Click Start, click run, and then typeDcomcnfg. Select the application to run automatically. The Application name is as follows:
MicrosoftAccess97-MicrosoftAccessDatabase
MicrosoftAccess2000/2002-MicrosoftAccessApplications
MicrosoftExcel97/2000/2002-MicrosoftExcelApplications
MicrosoftWord97-MicrosoftWordBasic
MicrosoftWord2000/2002-MicrosoftWordDocument
Click properties to open the Properties dialog box for this application.
6.Click the Security tab. Verify that the default access permission and the default start permission are selected.
7.Click the ID tab and select an interactive user.
8.Click OK to close the Properties dialog box and return to the main Application List dialog box.
9.InDCOMIn the configuration dialog box, click the Default Security tab.
10.Click Edit default value for access permission. Verify that the following users are listed in the access permission. If not, add these users:
System
Interactive
Everyone
Administrators
IUSR _ <machinename> *
IWAM _ <machinename> *
*These accounts are only installed on the computerInternetInformationServer(IIS).
11.Make sure that each user is allowed to access the database, and then click OK.
12.Click Edit default value for the launch permission. Verify that the following users are listed in the startup permission. If not, add these users:
System
Interactive
Everyone
Administrators
IUSR _ <machinename> *
IWAM _ <machinename> *
*These accounts are only installed on the computerIIS.
13.Make sure that each user is allowed to access the database, and then click OK.
14.Click OK to closeDcomcnfg.
If you used identity simulation before(InWeb. configConfigured in<IdentityImpersonate = "true"/>), You need to delete it !...

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.