COMException (0x800A13E9) - Word interop services

后端 未结 4 1534
北恋
北恋 2021-01-05 01:59

I am getting this stacktrace:

System.Runtime.InteropServices.COMException (0x800A13E9): Word ðú÷ì ááòéä.
   at Microsoft.Office.Interop.Word.Documents.Add(         


        
4条回答
  •  猫巷女王i
    2021-01-05 02:27

    Your scenario is NOT supported by Microsoft according to the KB article Considerations for server-side Automation of Office which states that

    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.

    The article then goes over alternatives to server-side automation one of which is Open XML. You might want to check this article out if you haven't already done so.

提交回复
热议问题