get error when I publish my web application to the server

  • Thread starter Thread starter Sun
  • Start date Start date
S

Sun

Hi guys,

I have a problem which troubled me last two weeks. I create a web
applicatoin using VS2005 to generate the powerpoint presentation. All
works fine in my local machine but after I publish the application to
the server, I get the error: Error HRESULT E_FAIL has been returned
from a call to a COM component.
Configuration of my local machine:
WinXP; MS office2003; and I am using the com compenent:
Microsoft PowerPoint Object 11
Configuration of the server
Win server2003; MS office 2003.

and here is the code(csharp) I use:
PowerPoint.Application ppapp = new PowerPoint.Application();
ppapp.Visible =
Microsoft.Office.Core.MsoTriState.msoTrue;
PowerPoint.Presentation pre = ppapp.Presentations.Open
(Server.MapPath(@"~\OfficeTemplate\MonthlyOperationData\Report.pot"),
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoTrue,
Microsoft.Office.Core.MsoTriState.msoTrue);


Can anyone give me some advise, thank you very much.
 
Sun said:
Hi guys,

I have a problem which troubled me last two weeks. I create a web
applicatoin using VS2005 to generate the powerpoint presentation. All
works fine in my local machine but after I publish the application to
the server, I get the error: Error HRESULT E_FAIL has been returned
from a call to a COM component.
Configuration of my local machine:
WinXP; MS office2003; and I am using the com compenent:
Microsoft PowerPoint Object 11
Configuration of the server
Win server2003; MS office 2003.

and here is the code(csharp) I use:
PowerPoint.Application ppapp = new PowerPoint.Application();
ppapp.Visible =
Microsoft.Office.Core.MsoTriState.msoTrue;
PowerPoint.Presentation pre = ppapp.Presentations.Open
(Server.MapPath(@"~\OfficeTemplate\MonthlyOperationData\Report.pot"),
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoTrue,
Microsoft.Office.Core.MsoTriState.msoTrue);


Can anyone give me some advise, thank you very much.

It sounds like you have a permission problem, if the solution works on your
local machine, but it doesn't work when it is deployed to the Win 2k3 Web
server.

The link may help you to get into the ballpark of a possible permission
issue solution.

<http://www.dotnetmafia.com/blogs/do...-returned-from-a-call-to-a-com-component.aspx>
 
It sounds like you have a permission problem, if the solution works on your
local machine, but it doesn't work when it is deployed to the Win 2k3 Web
server.

The link may help you to get into the ballpark of a possible permission
issue solution.

<http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/05/01...>- Hide quoted text -

- Show quoted text -

Hi Arnold,

Thank you for your suggestion but the error is still there. I
really want to give up. The error occurs when run the Open method.
and this statement "PowerPoint.Application ppapp = new
PowerPoint.Application(); " runs well even in win 2k3 server. Thank
you.
 
Back
Top