locked
[Discuss]: Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)) RRS feed

  • Question

  • User2089379676 posted

    I get error when I process Export to Exel on My Application Web ASP.Net:

    "Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))"

    On DCOMCnfg , check again configuration, i see:

    Tab: Identity -> This User: Config Accout Administrator

    I process config Change Option: The Interactive User -> Application Export to Exel is OK

    Why do I use admin accounts to configure for Indeity errors?

    Wednesday, July 8, 2020 8:43 AM

Answers

  • User-939850651 posted

    Hi Le Lam,

    According to your description, the cause of the issue may be a security problem in the way of starting the COM server.

    For this, you need to configure to verify the information. And you solved the issue by setting the administrator as the user.

    But there may be other reasons for this issue:

    1. The machine has a high CPU load and the process takes a long time to start and execute the CoRegisterClassObjects() in less than 120 seconds.
    2. The COM server doesn't register for the right class IDs.
    3. The COM server is currently stopping and there is a race condition between CoCreateInstance and the COM server stopping part.

    For more details, you could also read this document.

    Best regards,

    Xudong Peng

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 9, 2020 5:52 AM
  • User-821857111 posted

    Don't use Office Interop on a web server. It is not supported and Microsoft explicitly advise against it (https://support.microsoft.com/en-gb/help/257757/considerations-for-server-side-automation-of-office). If you want to work with Excel in a web application, use an Open Office XML library like EPPlus instead.

    Some examples of EPPlus: https://www.mikesdotnetting.com/category/34/epplus

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 9, 2020 9:59 AM

All replies

  • User-939850651 posted

    Hi Le Lam,

    According to your description, the cause of the issue may be a security problem in the way of starting the COM server.

    For this, you need to configure to verify the information. And you solved the issue by setting the administrator as the user.

    But there may be other reasons for this issue:

    1. The machine has a high CPU load and the process takes a long time to start and execute the CoRegisterClassObjects() in less than 120 seconds.
    2. The COM server doesn't register for the right class IDs.
    3. The COM server is currently stopping and there is a race condition between CoCreateInstance and the COM server stopping part.

    For more details, you could also read this document.

    Best regards,

    Xudong Peng

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 9, 2020 5:52 AM
  • User2089379676 posted

    Thank XuDong Peng!

    The Problem Here:

    After, I setting user: The Interactive User.

    My Application Is OK

    Performance DCOM Server is OK.

    Thursday, July 9, 2020 7:13 AM
  • User-821857111 posted

    Don't use Office Interop on a web server. It is not supported and Microsoft explicitly advise against it (https://support.microsoft.com/en-gb/help/257757/considerations-for-server-side-automation-of-office). If you want to work with Excel in a web application, use an Open Office XML library like EPPlus instead.

    Some examples of EPPlus: https://www.mikesdotnetting.com/category/34/epplus

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 9, 2020 9:59 AM