Failed to retrieve a component of the CLSID {91493441-5a91-11cf-8700-00aa0060263b} in a COM class factory because of the following error: 80070005
In csdn always have netizens ask this question, oneself also met, because some write for reference:
Symptoms:
Owordapplic = New Word.Application
When the program runs to this sentence, the following error occurs:
Failed to retrieve a component of the CLSID {91493441-5a91-11cf-8700-00aa0060263b} in a COM class factory because of the following error: 80070005.
Owordapplic = New Word.Application
When the program runs to this sentence, the following error occurs:
Failed to retrieve a component of the CLSID {91493441-5a91-11cf-8700-00aa0060263b} in a COM class factory because of the following error: 80070005.
Workaround One:
Control Panel-"Management tools-" Component Services-"computer-" My Computer-"DCOM config-" found Microsoft Word document
After
Click Properties to open the Properties dialog box for this application.
2. Click the Identity tab and select Interactive User.
3. Click the Security tab, select Custom in the launch and activation permissions and access permissions groups, and then
Add an ASP. NET account and IUSER_ computer name, customize---Edit
* 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 the DCOMCNFG.
Workaround Two:
If the above method does not solve the problem, it should be a permission problem, try the following method:
Use identity impersonation in Web. config to add a.? <identity impersonate= "true" username= "Your user name" password= "Password"/>
</system.web>
[Memo] Failed to retrieve component with CLSID {91493441-5a91-11cf-8700-00aa0060263b} in COM class factory