COM object with CLSID {00024500-0000-0000-C000-000000000046} is either not valid or not registered.

G

Guest

I have compiled code that populates data from sql database into an excel document on the client. When moving code to the web server and running it, I get an error COM object with CLSID {00024500-0000-0000-C000-000000000046} is either not valid or not registered. Excel is not installed on the web server. Is there any way to get around doing that? I have moved Interop.Excel.dll to the web server, but I guess since it's not truly registered and only referenced by code it will not work

Thanks for any help

Joel
 
K

Kevin Spencer

Your Interop class is simply a wrapper for the COM object. If the COM object
is not installed, well...

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

JROCamaro said:
I have compiled code that populates data from sql database into an excel
document on the client. When moving code to the web server and running it,
I get an error COM object with CLSID {00024500-0000-0000-C000-000000000046}
is either not valid or not registered. Excel is not installed on the web
server. Is there any way to get around doing that? I have moved
Interop.Excel.dll to the web server, but I guess since it's not truly
registered and only referenced by code it will not work?
 
A

anon

I have the same issue, the com dll is registered and tried running the
app with dll at diff locations, in bin, in winnt\system32 but both donot
seem to matter and i still get this exact same error....???
 
K

Kevin Spencer

COM DLLs are registered in the System Registry according to their location.
You don't want to put the COM dll into your bin folder or anywhere else that
is not the location recorded in the System registry. That is how COM locates
DLLs. Only your Interop Assembly should be in the bin folder. That's how
..Net locates assemblies.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
A

anon

Thanks Kevin !

So C:\WINNT\system32 should have the dll, is that correct?
Also, I am using OWC in my code, but could not find an OWC.DLL on my
machine to place on the server, is it MSOWC.DLL?Can i use OWC10.DLL
instead?

Thanks again for your response.
 
K

Kevin Spencer

So C:\WINNT\system32 should have the dll, is that correct?

I can't tell you where the COM DLL should be. It can be registered from any
location on the machine. If that is where it was registered in the System
Registry, that's where it should be.

If you're asking about deploying the DLL to the server, well, first of all,
that would be, in the case of an Office DLL, a violation of the Licensing
agreement. If you want to use an Office COM object, I believe you would have
to install a licensed copy of Office on the server. Of course, this also
makes the location of the DLLs a moot point, as they will be installed where
Office thinks they should be.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top