Deploy Office PIA to ASP.NET Server

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=, Apr 12, 2006.

  1. I'm trying to use the Office XP PIA in an ASP.NET application. It's working
    fine on my workstation and I can manipulate a Workbook using
    Microsoft.Office.Interop.Excel.

    When I try to deploy the application to a server, I get:
    "System.Runtime.InteropServices.COMException (0x80040154): COM object with
    CLSID {00024500-0000-0000-C000-000000000046} is either not valid or not
    registered."

    I've seen several articles that mention ways to deploy these PIA's,
    especially the following:
    "2: Place the required Office XP PIAs in the same directory as your
    solution and distribute your solution and the Office XP PIAs as a
    single unit. This option is only recommended for simple solution
    deployments, such as copying solutions from one file directory folder
    to another across a computer network. The main disadvantage with this
    option is that multiple copies of the same Office XP PIAs may be
    installed on end users' computers, which reduces these computers'
    available hard disk space."

    I tried to copy the DLL files into a folder within my project and have the
    References point at these copies of the dll files. No luck.

    Someone else mentioned copying the DLL's to the Bin folder, also without any
    luck.

    Please advise as to how what I need to do on the ASP.NET server to deploy
    code there that can use the Microsoft.Office.Interop.Excel classes.

    Thanks,

    Chris Frohlich
    =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=, Apr 12, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=

    David Browne Guest

    "ChrisFrohlich" <> wrote in message
    news:...
    > I'm trying to use the Office XP PIA in an ASP.NET application. It's
    > working
    > fine on my workstation and I can manipulate a Workbook using
    > Microsoft.Office.Interop.Excel.
    >
    > When I try to deploy the application to a server, I get:
    > "System.Runtime.InteropServices.COMException (0x80040154): COM object with
    > CLSID {00024500-0000-0000-C000-000000000046} is either not valid or not
    > registered."
    >
    > I've seen several articles that mention ways to deploy these PIA's,
    > especially the following:
    > "2: Place the required Office XP PIAs in the same directory as your
    > solution and distribute your solution and the Office XP PIAs as a
    > single unit. This option is only recommended for simple solution
    > deployments, such as copying solutions from one file directory folder
    > to another across a computer network. The main disadvantage with this
    > option is that multiple copies of the same Office XP PIAs may be
    > installed on end users' computers, which reduces these computers'
    > available hard disk space."
    >
    > I tried to copy the DLL files into a folder within my project and have the
    > References point at these copies of the dll files. No luck.
    >
    > Someone else mentioned copying the DLL's to the Bin folder, also without
    > any
    > luck.
    >
    > Please advise as to how what I need to do on the ASP.NET server to deploy
    > code there that can use the Microsoft.Office.Interop.Excel classes.
    >


    That sounds like the PIA's are loading fine. They are .NET assemblies. It
    looks like a failure loading Excel's com components.

    COM will look at the following registry key

    HKEY_CLASSES_ROOT\CLSID\{00024500-0000-0000-C000-000000000046}

    To find out how to load the component that supports the COM interface
    identified by that CLSID.

    So, is Excel installed on the server?

    David
    David Browne, Apr 12, 2006
    #2
    1. Advertising

  3. Excel is not installed. Forgive my ignorance, but is this necessary, and if
    so why?

    Thanks in advance,

    Chris


    "David Browne" wrote:

    >
    > "ChrisFrohlich" <> wrote in message
    > news:...
    > > I'm trying to use the Office XP PIA in an ASP.NET application. It's
    > > working
    > > fine on my workstation and I can manipulate a Workbook using
    > > Microsoft.Office.Interop.Excel.
    > >
    > > When I try to deploy the application to a server, I get:
    > > "System.Runtime.InteropServices.COMException (0x80040154): COM object with
    > > CLSID {00024500-0000-0000-C000-000000000046} is either not valid or not
    > > registered."
    > >
    > > I've seen several articles that mention ways to deploy these PIA's,
    > > especially the following:
    > > "2: Place the required Office XP PIAs in the same directory as your
    > > solution and distribute your solution and the Office XP PIAs as a
    > > single unit. This option is only recommended for simple solution
    > > deployments, such as copying solutions from one file directory folder
    > > to another across a computer network. The main disadvantage with this
    > > option is that multiple copies of the same Office XP PIAs may be
    > > installed on end users' computers, which reduces these computers'
    > > available hard disk space."
    > >
    > > I tried to copy the DLL files into a folder within my project and have the
    > > References point at these copies of the dll files. No luck.
    > >
    > > Someone else mentioned copying the DLL's to the Bin folder, also without
    > > any
    > > luck.
    > >
    > > Please advise as to how what I need to do on the ASP.NET server to deploy
    > > code there that can use the Microsoft.Office.Interop.Excel classes.
    > >

    >
    > That sounds like the PIA's are loading fine. They are .NET assemblies. It
    > looks like a failure loading Excel's com components.
    >
    > COM will look at the following registry key
    >
    > HKEY_CLASSES_ROOT\CLSID\{00024500-0000-0000-C000-000000000046}
    >
    > To find out how to load the component that supports the COM interface
    > identified by that CLSID.
    >
    > So, is Excel installed on the server?
    >
    > David
    >
    >
    >
    =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=, Apr 12, 2006
    #3
  4. =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=

    David Browne Guest

    "ChrisFrohlich" <> wrote in message
    news:...
    > Excel is not installed. Forgive my ignorance, but is this necessary, and
    > if
    > so why?
    >


    The Office PIA's allow .NET code to interoperate with the components of the
    Office suite.

    The PIA or Primary Interop Assembly is a .NET assembly that serves as a
    brige between .NET code and a COM component. It does not include the COM
    component itself. You call into the PIA, the PIA in turn loads the
    requested COM component and marshalls data back and forth from the COM
    component to .NET.



    David
    David Browne, Apr 12, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alvin Bruney

    Office PIA bomb out

    Alvin Bruney, Jul 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    421
    Alvin Bruney
    Jul 13, 2003
  2. =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=

    ASP.NET: Can't Kill EXCEL.exe with Office PIA

    =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=, Apr 14, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    8,119
    =?Utf-8?B?S2VpdGg=?=
    Apr 25, 2006
  3. Stan Accrington
    Replies:
    1
    Views:
    922
    Michael Borgwardt
    May 13, 2004
  4. =?Utf-8?B?dGlnZXJqYWRl?=

    COM Error using Office 2003 PIA in ASP.Net

    =?Utf-8?B?dGlnZXJqYWRl?=, Jul 31, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    3,479
    =?Utf-8?B?dGlnZXJqYWRl?=
    Aug 1, 2006
  5. dinoo
    Replies:
    3
    Views:
    1,902
    Andrew Morton
    Jul 9, 2009
Loading...

Share This Page