ASP.NET application call excel throw "The remote procedure call failed"

Leo Ng 20 Reputation points
2024-03-20T03:45:04.2966667+00:00

Following is the Microsoft Excel Application Properties in DCOM Config in my web server (Windows Server 2022).

User's image

It is work fine when no account remote login to the server. My web application can read and write Excel file.

But I find that my web application throw "The remote procedure call failed" when

any account login the web server.

May I know any setting or config can solve it?

Microsoft 365 and Office Excel For business Windows
Windows for business Windows Server User experience Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 36,291 Reputation points
    2024-03-23T14:49:10.7466667+00:00

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

    https://learn.microsoft.com/en-us/office/client-developer/integration/considerations-unattended-automation-office-microsoft-365-for-unattended-rpa

    Try this instead.

    https://learn.microsoft.com/en-us/troubleshoot/developer/visualstudio/csharp/language-compilers/query-excel-data-aspx-page

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.