问题
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"
回答1:
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.
来源:https://stackoverflow.com/questions/21188147/unable-to-open-work-file-with-iis-but-work-fine-when-run-with-vs