C # solution to failure when calling the word component

Source: Internet
Author: User

Solution to failure when retrieving components whose CLSID is {000209ff-0000-0000-c000-000000000046} in the com class factory

Application WhenProgramWhen this statement is run, the following error occurs: retrieving components whose CLSID is {000209ff-0000-0000-c000-000000000046} in the com class factory failed because of the following error: 80070005. 3. click the "Security" tab, select "Custom" in the "Start and activate Permissions" and "Access Permissions" groups, and then click "edit"> Add ASP. net account and iuser_computer name. Solution 2: If the preceding method cannot solve the problem, it should be a permission problem. Please try the following method. use identity simulation in config, in <system. in the Web> section, add <identity impersonate = "true" username = "your username" Password = "password"/> </system. web>

1: Install wordsoftware 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 Word application", right-click it, and click "properties". The "Microsoft Word 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 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 DCOM permission for the corresponding word.

Note: This is configured on win2003. On 2000, it may be the configuration of ASPNET users.

Since word is opened on the server, you should write a method to save the exported data on the server and pass it to the client, finally, each time this function is called, all the words previously generated on the server are deleted.

 

Failed to retrieve components whose CLSID is {000209ff-0000-0000-c000-000000000046} in the com class factory because of the following error: 80070005

On csdn, some netizens have always asked this question, and I have encountered it myself. For some reason, I wrote it for your reference:

Symptoms:

Owordapplic = new word. Application

When the program runs this sentence, the following error occurs:

Failed to retrieve components whose CLSID is {000209ff-0000-0000-c000-000000000046} in the com class factory because of the following error: 80070005.

Owordapplic = new word. Application

When the program runs this sentence, the following error occurs:

Failed to retrieve components whose CLSID is {000209ff-0000-0000-c000-000000000046} in the com class factory because of the following error: 80070005.

Solution 1:

Control Panel-> Administrative Tools-> component services-> Computer-> my computer-> DCOM configuration-> Microsoft Word documents

After

Click properties to open the Properties dialog box for this application.

2. Click the ID tab and select an interactive user.

3. Click the "Security" tab, select "Custom" in the "Start and activate Permissions" and "Access Permissions" groups, and then

Custom-> edit-> Add ASP. NET account and iuser _ computer name

* These accounts only exist when IIS is installed on the computer.

13. Make sure that each user is allowed to access the service and click OK.

14. Click OK to disable dcomcnfg.

Solution 2:

If the above method cannot solve the problem, it should be a permission problem. Please try the following method:

Use identity simulation in Web. config and add <identity impersonate = "true" username = "your username" Password = "password"/> In the <system. Web> section.

</System. Web>

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.