Server configuration excel export HResult: 0x800A03EC

The exception prompt is as follows:
Microsoft Office Excel cannot access the file “*. XLS”. The possible reasons are:
1 the file name or path does not exist this is an unexplained error. Debugging on the local machine is normal, but once it is deployed to the server, it cannot be accessed

After checking some information, we found that everyone encountered this problem

The solution is to create a directory named desktop under the directory of C: windows, system32, config, systemprofile and C: windows, syswow64, config, systemprofile

For the problem that COM components cannot be accessed,
solution:
1.
1). Add simulation in webconfig and add administrator permissions,

2). In this way, you can start the application process, operate excel, create new EXCEL and export Excel, but you still can’t open the excel file on the server side
however, this method has a disadvantage: if you, If the crystal report is used in the project, the crystal report will be abnormal, so the handout is handled in the latter way
2.
in the component service, DOCM sets the attributes of Microsoft Excel application,
because it operates on a 64 bit system, docom does not have it by default in the component service, because Microsoft Excel application is a DCOM configuration of 32, So solve it in the following way (refer to step 3)

    1) . start –> run –> CMD
    2) at the command prompt, enter comexp.msc – 32 to open the 32 console
    3). In the file menu, add and delete snap ins –> component services
    4). Find “Microsoft Excel application” in “DCOM configuration”, right-click it, and then click “properties”, The “Microsoft Excel application properties” dialog box will pop up
    5). Click the “identity” tab and select “interactive user”
    6). Click the “security” tab, click “custom” on the “start and activate permissions”, and then click the corresponding “Edit” button to fill in a “network service” user in the pop-up “security” dialog box, And give it the “local start” and “local activation” permissions
    7). It is still the “security” label. Click “custom” on the “access permission”, and then click “Edit”. In the pop-up “security” dialog box, a “network service” user is also added, Then give “local access” permission.
    the specific figure is as follows:






    Read More: