get error when I publish my web application to the server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sun

    #1

    get error when I publish my web application to the server

    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.Appl ication ppapp = new PowerPoint.Appl ication();
    ppapp.Visible =
    Microsoft.Offic e.Core.MsoTriSt ate.msoTrue;
    PowerPoint.Pres entation pre = ppapp.Presentat ions.Open
    (Server.MapPath (@"~\OfficeTemp late\MonthlyOpe rationData\Repo rt.pot"),
    Microsoft.Offic e.Core.MsoTriSt ate.msoFalse,
    Microsoft.Offic e.Core.MsoTriSt ate.msoTrue,
    Microsoft.Offic e.Core.MsoTriSt ate.msoTrue);


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

    #2
    Re: get error when I publish my web application to the server


    "Sun" <Sun.hifi@gmail .comwrote in message
    news:f662906d-fd82-4bc2-b149-a976e3ebf31d@c2 2g2000prc.googl egroups.com...
    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.Appl ication ppapp = new PowerPoint.Appl ication();
    ppapp.Visible =
    Microsoft.Offic e.Core.MsoTriSt ate.msoTrue;
    PowerPoint.Pres entation pre = ppapp.Presentat ions.Open
    (Server.MapPath (@"~\OfficeTemp late\MonthlyOpe rationData\Repo rt.pot"),
    Microsoft.Offic e.Core.MsoTriSt ate.msoFalse,
    Microsoft.Offic e.Core.MsoTriSt ate.msoTrue,
    Microsoft.Offic e.Core.MsoTriSt ate.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/dotnettipofthed ay/archive/2008/05/01/error-hresult-e-fail-has-been-returned-from-a-call-to-a-com-component.aspx>


    Comment

    • Sun

      #3
      Re: get error when I publish my web application to the server

      On Nov 18, 12:15 pm, "Mr. Arnold" <MR. Arn...@Arnold.c omwrote:
      "Sun" <Sun.h...@gmail .comwrote in message
      >
      news:f662906d-fd82-4bc2-b149-a976e3ebf31d@c2 2g2000prc.googl egroups.com...
      >
      >
      >
      >
      >
      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.Appl ication ppapp = new PowerPoint.Appl ication();
                     ppapp.Visible =
      Microsoft.Offic e.Core.MsoTriSt ate.msoTrue;
                     PowerPoint.Pres entation pre = ppapp.Presentat ions.Open
      (Server.MapPath (@"~\OfficeTemp late\MonthlyOpe rationData\Repo rt.pot"),
      Microsoft.Offic e.Core.MsoTriSt ate.msoFalse,
      Microsoft.Offic e.Core.MsoTriSt ate.msoTrue,
      Microsoft.Offic e.Core.MsoTriSt ate.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/dotnettipofthed ay/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.App lication ppapp = new
      PowerPoint.Appl ication(); " runs well even in win 2k3 server. Thank
      you.

      Comment

      Working...