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

后端 未结 7 907
有刺的猬
有刺的猬 2020-11-27 21:46

I am trying to convert a .xls file to an .xlsx file on the server-side using Microsoft.Office.Interop.Excel.Workbook class as follows:

 workBook         


        
7条回答
  •  孤城傲影
    2020-11-27 21:56

    I found this article which talks more about this issue in depth If this helps, error “80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))” could occur due to following reasons:

    1. The machine has a high CPU load and the process takes a long time to start and fails to 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.
    4. There is a security problem in the way the COM server is started (this page seems to suggest misspelled passwords or lacking the "Login as Batch Job" privilege for "Run As.." COM servers, but anyway I would suggest re-verifying this information for your specific configuration)

    https://blogs.msdn.microsoft.com/adioltean/2005/06/24/when-cocreateinstance-returns-0x80080005-co_e_server_exec_failure/

提交回复
热议问题