COM object with CLSID is either not valid or not registered

G

Guest

I have a asp.net web application executing on a windows 2003 Server. I make a
reference in the project to a COM object and the Interop gets created
successfully. When the application executes I create a instance of the COM
object as such (c#):
XMLAPI.GMDataClass gdc;
gdc = new XMLAPI.GMDataClass();
I then receive the above mentioned error message. The strange thing is when
I do the same thing in a Windows Forms.net application it works fine!!
Can anyone help me here please?
Any suggestions are highly appreciated.
 
K

Kevin Spencer

To use COM, an app must have permission to read the System Registry.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
G

Guest

Kevin,

When I debug/execute the application I am logged on as Administrator of the
machine and if the app requires access to the registry does that mean I need
to give one of the asp.net user accounts on the system access rights to the
registry and if so how do I do that?

Thanks,
Joel
 
G

Guest

Well I finally found a solution to the problem. I will share my findings as
many times you look for people who had similar issues than yourself and they
never share their solution after they solved it.

The issue here is that I can access a component through my winforms app but
not through my asp.net app. The program that installed the component did not
register the component in the DCOM or COM+ sections of my Windows 2003 Server
but only registered its own main executable in the DCOM section. When I then
went and made a reference to the main executable in my asp.net app instead of
the dll I wanted it worked fine. So the conclusion here is to not forget to
go look at what is actually available in the COM+ and DCOM sections of the
machine which you are hosting/developing on.

Hope this helps someone in future.

Until we meet again.

Joel
 

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,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top