By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,012 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Deploy Office PIA to ASP.NET Server

P: n/a
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
Apr 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"ChrisFrohlich" <Ch***********@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
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
Apr 12 '06 #2

P: n/a
Excel is not installed. Forgive my ignorance, but is this necessary, and if
so why?

Thanks in advance,

Chris
"David Browne" wrote:

"ChrisFrohlich" <Ch***********@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
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

Apr 12 '06 #3

P: n/a

"ChrisFrohlich" <Ch***********@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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
Apr 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.