The project believes that people often encounter the export of Word, Excel and other requirements, in the actual development environment, generally do not have any problems, but when published to IIS, you may encounter a variety of problems, is generally the issue of permissions. A few days ago the company project released, the word export failed to view the log, the report is 80070005 denied access errors, but when the use of Kestrel boot, there is no problem, but there is an error in IIS, IIS permissions problem, It should also be a problem that people often encounter.
80070005 verbose error retrieving a COM class factory in which the CLSID is a {xxxx-xxxx-xxxx-xxxx} component fails, the workaround is to configure the COM component in the server to add the appropriate permissions.
1. Open run-and-enter command dcomcnfg-> Component Services, computer->dcom configuration->microsoft97-2003 Document
2, or through the Control Panel, management tools, Component Services, computer->dcom configuration->microsoft97-2003 Document
Using the above method many times we cannot find the microsoft97-2003 document configuration option from the DCOM configuration, which can be used
comexp.msc-32 command, open the component service, you can find this option, and some say that the option can be found using the mmc-32 command, but when I use the command on WIN10, I open an empty console and need to add control options myself. Anyway, just find the microsoft97-2003 document option.
Configuration:
Right-click the option Properties, select Security--Start and activate permissions---Customize, add Network service users, and tick the Select to activate option, tap OK. At the same time, set access permissions to custom and add Network service users. After you configure a COM component, you still cannot export, you need to configure IIS permissions, select the application pool that the published project uses, right-click Properties, advanced settings, and process model, the IDENTITY option defaults to using Applicationpoolidentity, We will change it to a custom account, add the server username and password, and finally restart IIS, the problem is resolved.
Scan QR code Follow my public number, learn together and make progress together!
. NET core MVC deployment to IIS export Word prompt 80070005 access denied