PowerPoint could not open the file.

Posted by Alok under IIS on 8/29/2013 | Points: 10 | Views : 5614 | Status : [Member] | Replies : 8
String strTemplate;
strTemplate = Server.MapPath(System.IO.Path.Combine("~/UploadsPPT", "PPTslide.pptx"));

var app = new Microsoft.Office.Interop.PowerPoint.Application();
var pres = app.Presentations;

var file = pres.Open(strTemplate, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);
Microsoft.Office.Interop.PowerPoint.SlideShowSettings slideSetting = file.SlideShowSettings;
slideSetting.Run();


i am using above code to open ppt..,this code works well in file system
But when hosted on iis i get error as
: PowerPoint could not open the file.

Can any one provide me solution.

Thanks & Regards,
Alokssm



Responses

Posted by: Bandi on: 8/29/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
http://forums.asp.net/t/1866584.aspx/1?Web+application+works+with+VS2010+but+not+in+IIS+7+

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alok on: 8/29/2013 [Member] Starter | Points: 25

Up
0
Down
i have gone through this link and also provide permission as stated in this link..but it does not work,,
http://www.bloing.net/2011/01/how-to-make-iis7-play-nice-with-office-interop/

Thanks & Regards,
Alokssm

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alok on: 8/30/2013 [Member] Starter | Points: 25

Up
0
Down
wating for right solution..

Thanks & Regards,
Alokssm

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 8/30/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
This one?
http://stackoverflow.com/questions/9081727/asp-net-httphandler-for-pptx-files-not-working-in-web-config
http://jameskovacs.com/2007/10/11/configuring-iis6-to-serve-office-2007-file-formats/

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alok on: 8/30/2013 [Member] Starter | Points: 25

Up
0
Down
i want solutiton in reference to..

Microsoft.Office.Interop.PowerPoint

Thanks & Regards,
Alokssm

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 8/30/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
can you please look into this link...?
http://forums.iis.net/t/1166203.aspx/1

http://stackoverflow.com/questions/2653740/problems-with-office-automation-in-asp-net-i-can-use-alternatives-such-as-open

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alok on: 8/30/2013 [Member] Starter | Points: 25

Up
0
Down
i am using
office.dll :Version :14.0
and
Interop.Microsoft.Office.Interop.PowerPoint.dll :version: 2.10

Window -7 ,32 bit operating system

AND

IIS 7

also
Microsoft Office 2007 is installed in my system

I HAVE PROVIDED ALL RIGHTS TO Microsoft Office PowerPoint Slide IN COMPONENT SERVICES

however I AM GETTING SAME ERROR
as
:
PowerPoint could not open the file.







Thanks & Regards,
Alokssm

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mattyclown on: 5/7/2014 [Member] Starter | Points: 25

Up
0
Down

Login to post response