COM Exception 0x800A11F9 - Cannot activate application

前端 未结 3 799
眼角桃花
眼角桃花 2021-01-14 11:14

I have a C# 2.0 (WinForms) project in which I try to activate word 2003 (word is installed on the system). By using the following code:

private void Activate         


        
相关标签:
3条回答
  • 2021-01-14 11:36

    COM error 0x800A11F9 is a well-known permission problem that occurs when an underprivileged user (such as Network Service) tries to activate an Office application.

    In your case, the problem can't come from IIS since you're developing a WinForms application. Rather, it looks like your app is started by a Windows service running under the Local Service or Network Service user account.

    If that's indeed the case, you need to change the user account used by the service in the Log on tab of the service's properties dialog box.

    EDIT: You might want to try putting the code that activates Word into a COM+ component and configuring the identity of the component so it runs under a user account that can launch Word.

    0 讨论(0)
  • 2021-01-14 11:36

    Just a thought i've seen a similar error when doing word automation on the server (which we no longer do due to flakiness), however at that time it was caused by permission issues from the ASP.net account, I know you are running in winforms but could this possibly be related to permissions ?

    0 讨论(0)
  • 2021-01-14 11:43

    If it is a permissions problem, and you can't get Sitecore to run as a user with sufficient permissions, perhaps you could write a different service ("WordService") for your Sitecore application to send requests to. Then WordService could run as a slightly more privileged user, do your stuff with Word, then e.g. write the filled-in Word file to a known location SiteCore can access, or whatever you want it to do.

    0 讨论(0)
提交回复
热议问题