InteropServices COM异常 [英] InteropServices COM Exception
问题描述
嗨
在IIS7中部署asp.net应用程序时遇到问题.
发生了一些异常.实际的例外是
:System.Runtime.InteropServices.COMException(0x800A1098):此命令不可用,因为未打开任何文档.在c:\ inetpub \ wwwroot \ T2_Tool \ T2 \ TestCase \ T2_TestCases.aspx.cs:第123行的T2_TestCases.LoadTOC()处的Microsoft.Office.Interop.Word.ApplicationClass.get_ActiveDocument()中
当我直接在VS 2008中运行源代码但在IIS上发布源代码时,它会完美地发挥作用.
在代码中,我正在阅读Word文档并将Word的内容导出到Excel File
谢谢
Hi
I am facing issue while deploying asp.net application in IIS7.
Some exception has occured. The actual exception is
:System.Runtime.InteropServices.COMException (0x800A1098): This command is not available because no document is open. at Microsoft.Office.Interop.Word.ApplicationClass.get_ActiveDocument() at T2_TestCases.LoadTOC() in c:\inetpub\wwwroot\T2_Tool\T2\TestCase\T2_TestCases.aspx.cs:line 123
It works perfectly when i run source code directly in VS 2008 but when i publish it on IIS, it gives above error.
In code I am reading Word Document and Exporting the contents of word to Excel File
Thanks
推荐答案
签出 [ ^ ]
这篇关于InteropServices COM异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!