无法打开工作文件与IIS但与VS运行正常工作 [英] Unable to open work file with IIS but work fine when run with VS
问题描述
我停留在非常奇怪的问题。
我在做什么是通过Miscrosft办公室DLL
Microsoft.Office.Interop.Word.Application appWord =新Microsoft.Office.Interop.Word.Application();
wordDocument = appWord.Documents.Open(C:\\\\ aa.docx);
enery的事情是工作的罚款,直到我运行从Visual Studio我的应用程序,但是当我通过IIS运行它thne wordDocument 空正在添加
我认为这是配股,但不知道磨到斗。我的网站应用程序池身份是本地系统
通常有两个问题:
- 您还没有安装IIS机器上的Office
- 您必须指定文件的访问权限。
块引用>有是你应该考虑的另一件大事:Word中互操作建议不要在IIS进程。请参见本的微软文档。
am stuck in very strange issue. What i am doing is opening a file through Miscrosft Office DLL
Microsoft.Office.Interop.Word.Application appWord = new Microsoft.Office.Interop.Word.Application(); wordDocument = appWord.Documents.Open("C:\\aa.docx");
enery thing is working fine till i run my application from visual studio, but when i run it through IIS thne wordDocument comming null.
i think it is rights issue but dont know whet to doo. My web site app pool identity is "LocalSystem"
解决方案Usually there are two issues:
- You haven't installed Office on the IIS machine
- You have no access to the file specified.
There is another big thing you should consider: Word interop IS NOT RECOMMENDED on an IIS process. See this Microsoft document.
这篇关于无法打开工作文件与IIS但与VS运行正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!