By default, ASP. NET starts excel with "net service". If you do not have the correct permission or use imperson, the Excel cannot be started.
Let's take a look at how to handle the imitation (imperson. Simulate the username and password that requires the permission to start and access excel in Web. config. The password is in plaintext and the format is as follows:
<System. Web>... <! -- Imitation Syntax --> <identity impersonate = "true" username = "igame" Password = "1234567"/>... </system. Web>
If the simulation is not used, dcomcnfg.exe is used to configure components. Excel component location: Component Service/computer/DCOM configuration/Microsoft Excel APPICATION.
Right-click the menu to open properties. On the Security Page, change "Start and activate Permissions" to "Custom" and add "net service" users, select "Local activation" and "Local startup", and then click OK. Other actions are not required.