Error reading word doc using Micorsoft.Office.Interop(Object library) via IIS 7

后端 未结 3 846
别跟我提以往
别跟我提以往 2020-12-07 00:27

Iam facing issue while reading the document when runnning code from IIS. It is not reading the document and throwirng an error \"No document is opne when trying to save the

相关标签:
3条回答
  • 2020-12-07 00:45

    could be due to security setting, check this http://support.microsoft.com/kb/257757/en-us. Not a good idea to use interop on server, you may look at other option like openxml sdk

    0 讨论(0)
  • 2020-12-07 00:46

    Don't do this, it's not officially supported (highlighting by me):

    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.

    Source: MS KB 257757. The article also contains a list of alternative solutions. If all else fails, you might have to resort to a third-party library that understands the Word format.

    0 讨论(0)
  • 2020-12-07 00:58

    Add: C:\Windows\SysWOW64\config\systemprofile\Desktop

    It's incredibly successful.

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