Groups | Blog | Home
all groups > dotnet component services > july 2003 >

dotnet component services : Object Methods does not appear in the Component Services snap-in !?


Mike Dice [MSFT]
7/18/2003 7:00:19 AM
Methods only appear on interfaces. Your ServicedComponent derived object
should expose a public interface that has the methods on it that you want to
implement.

Here's a partial example from a test project I had lying around:
public interface IMyObject

{

string DoIt();

}


[IISIntrinsics]

public class MyObject : ServicedComponent, IMyObject

{

public MyObject()

{

}

string IMyObject.DoIt()

{

return ShowRequestHeader();

//return "Done";

}

}

Also, have a look at the discussion on qualifying .net types for interop:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconqualifyingnettypesforinteroperation.asp?frame=true

Mike

[quoted text, click to view]

Claudiu Tomescu
7/18/2003 11:47:15 AM
Hello everybody,

I have a problem with a serviced component developped in C# : I compile the
component, I use the GACUtil.exe tool to put it into the global assembly
cache (my application is configured as a server application), then I deploy
the application into the COM+ using regsvcs.exe tool. All these are working
just fine.

Now, the first problem is when I look at the component in the Component
Services snap-in : the application is correctly created, the component is
deployed except that no methods appear !! Is there any trick I have to do?

The second problem comes when I run a client : the client successfuly
creates an object and actually calls the method which does not appear !!!

I would appreciate if someone could give me some idea or point me to the
right direction.

Thanks,
Claudiu

Claudiu Tomescu
7/18/2003 4:15:04 PM
Hi Mike,

Thank you for your answer.

I've just begun reading the article in the MSDN about .NET interop and
things seems to clarify :)

Regards,
Claudiu

[quoted text, click to view]
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconqualifyingnettypes
forinteroperation.asp?frame=true
[quoted text, click to view]

AddThis Social Bookmark Button