Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

Error:
System.Runtime.InteropServices.COMException (0x80004005): PowerPoint could not open the file.

Localhost:working fine , PowerPoint application is opened with the presentation, I made changes using c#

IIS Server: Above Error is thrown, I fixed the previous error thrown-[E- Access Denied] by granting permissions to Microsoft PowerPoint Slide DCOM using DCOMCNFG window.

Error at Line:

C#
objPres = objPresSet.Open(@"C:\Temp\Template.pptx", MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);


any suggestions..

Thanks
Posted

1 solution

What do you expect with the presentation to happen? There is no screen attached to the session of IIS on the server, it won't be opened on the client computer, and the user won't see it!
In your case, IIS might not have access rights to the file on the level of the file system.
Microsoft discourages the use of Office products on IIS. If you need to generate a PowerPoint Presentation, or convert a ppt to a pdf, better use Third Party tools for such purposes.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900