Groups | Blog | Home
all groups > asp.net > april 2005 >

asp.net : Access COM+ Object from Classic ASP


Mike Douglas
4/2/2005 11:13:10 PM
Hi Steve,

Does your object have a namespace? If so you will have to do a
Server.CreateObject("mynamespace.myobject.myclass"). Let me know if
that's not it. The regasm.exe should take care of it. Also to test
it, try creating a simple .vbs file and running it.

I hope this helps.

Mike Douglas

www.doitconsultants.com

On Sat, 2 Apr 2005 23:59:48 -0500, "Steve Lutz"
[quoted text, click to view]
Steve Lutz
4/2/2005 11:59:48 PM
Hi All,

I wrote a COM+ object in C#, and I can use it from other .NET Applications.
I need to be able to access it from Classic ASP.
First, Can I do that?
I tried using Server.CreateObject("myobject.myclass") but that doesn't work.
Yes, it's registered (regasm.exe), again, other .NET application can use it.
I've already checked security on the object also.

Thanks in Advance

Steve

Steve Lutz
4/3/2005 9:40:00 AM
Hi Mike,
Thanks for the tip, but that doesn't seem to be it, although I did figure it
out the hard way.

I created my COM+ object in DotNet and compiled.
I used gacutil to register it in the cache
I used REGSVCS.EXE to add to COM+ catalog


My Assembly name is "SteveCOMPLUS.DLL"
My Namepsace is "SteveCOMPLUS"
The Class is called "TestObject", so full namespace is
"SteveCOMPLUS.TestObject"

After doing the REGSVCS.EXE, I search my registry for "SteveCOMPLUS" I found
2 relevant entries under HKEYCLASSESROOT, called SteveCOMPLUS and
SteveCOMPLUS.Class1.

So in my ASP, I just did a Server.CreateObject("SteveCOMPLUS") and that gave
me a reference to my SteveCOMPLUS.TestObject.

What's strange is that I don't even have a Class1 class in my COMPLUS
project.

Steve
..

[quoted text, click to view]

AddThis Social Bookmark Button