Problem description:
Solution to failure when retrieving components whose CLSID is {000209ff-0000-0000-c000-000000000046} in the com class factory
When the application program runs this sentence, the following error occurs: retrieving components whose CLSID is {000209ff-0000-0000-c000-000000000046} in the com class factory fails because of the following error: 80070005.
Solution:
1. Configure the DCOM permission for the corresponding word.
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.
2. Configure web. config
Use identity simulation in Web. config and add <identity impersonate = "false" username = "your username" Password = "password"/> to the <system. Web> section.
</System. Web>
(Note: In the original article impersonate = "true", the tested value should be impersonate = "false ")