System.Runtime.InteropServices.COMException (0x80080005): getting COM factory class for component with CLSID

I replace MS Word MergeFields with data from SQL Server in a simple asp.net C # application, and it works fine locally, but when I publish it often, I get the following:

System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {00020906-0000-0000-C000-000000000046} failed due to the following error: 80080005. 

I tried to provide full access to IIS_IUSRS and NETWORK SERVICE , as well as set the identifier interactively in the DCOM configuration, but did not fix anything.

+7
source share
3 answers

For unpleasant permissions that prevent you from doing what you expect (I also met in the past). Sometimes I had to change DCOM / COM + permissions to an object. On the DCOM Configuration tab for your project under security, make sure that the BOTH Launch and Activation and Access are configured to explicitly include the user account that you intend to allow.

Now one more thing - just exclude everyone else. I even entered (for testing / confirmation only) that on the "Identification" tab you can select "Interactive user", "Start user" or "This user". I would add that you have permissions (make sure your account is also in startup and activation ... and the permissions on the previous tab). And also enter / confirm your password.

If this still fails, I would try to add an ADMIN account for permissions and try ... only for the purpose of yes, its user-based permissions. After confirmation, you can scale it and even create some simplified limited user whose main goal is to run this utility, and this new user has the appropriate permissions to do this.

Once this is done, you should go well.

Now, having said that, I came across another thing, and it was quite a while ago, so this may not be a problem. Periodically, during certain "Windows" updates, functionality would simply stop working. However, if all I did was return to user service, change the password for the account (even if just save it with the same original password) and save it, then go back to DCOM and enter / re-confirm the save there, all functional again.

+3
source

You should share the folder in which you save the document created from the template with the NETWORK SERVICE user.

+1
source

Change dcomcnfg identity to interactive and not to user startup.

Link: Error: 80070005 , is there something in this forum about

 Retrieving the COM class factory for component with CLSID {7979FAA5-3A2A-4E50-A2C9-286C6F34C1D3} failed due to the following error: 80080005 
0
source

All Articles