我上傳PPT文件,我將ppt silde轉換爲圖像。當我在visual studio中運行時,它工作正常,但是當我將代碼發佈到IIS服務器時,以下錯誤無法上傳Ppt並在IIS服務器中讀取
Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
代碼的這篇:
Microsoft.Office.Interop.PowerPoint.Application PowerPoint_App = new Microsoft.Office.Interop.PowerPoint.Application();
Microsoft.Office.Interop.PowerPoint.Presentations multi_presentations = PowerPoint_App.Presentations;
Microsoft.Office.Interop.PowerPoint.Presentation presentation = multi_presentations.Open(filePath, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);
可能出現[需要什麼服務器端才能運行Office Interops?](http://stackoverflow.com/questions/26224066/what -is-required-server-side-to-run-office-interops) –
https://support.microsoft.com/en-us/kb/257757停止浪費時間在那和下面w微軟對Office服務器端自動化的建議。 –
由於Office可能表現出不穩定的行爲,因此Microsoft目前不推薦並不支持來自任何無人蔘與的非交互式客戶端應用程序或組件(包括ASP,ASP.NET,DCOM和NT服務)的Microsoft Office應用程序的自動化, /或在此環境中運行Office時發生死鎖。 https://support.microsoft.com/en-us/kb/257757 – gsharp