If I put a watch on oLibrary its value comes back as
{System.Runtime.Remoting.Proxies.__TransparentProxy} and I can't expand
any of its properties which is how it behaves when I use it in a
Remoting environment also.  But when I try and reference one of the
properties, that's when I get the exception.

I'm not sure about the CTRL.Library class being public.  I'm pretty sure
it is since I have used it in a true Remoting environment and not had a
problem but I can check on that.

Am I wrong in wanting to use COM+/Enterpise Services ?  I thought that
this was the mechanism for developing scalable enterprise applications.

Nick
P.S. By the way, other than this email list do you know of any other
places to post technical questions like this ?  I know there are the
microsoft newgroups, but those seem to have very little traffic on them
and I was wondering if there was a place where one could post really
technical questions and hope to get responses.  Other than of course
asking Microsoft directly.

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Woodring
Sent: Friday, January 05, 2007 4:17 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Passing an object reference back from a
COM+ hosted object

> So I am getting the error when I try and execute the oLibrary.Version 
> method.  The o.GetLibrary() call executes but I'm not sure its 
> returning anything useful.

In the debuggger, if you hover your cursor over the oLibrary variable
after you execute this line:

        oLibrary = o.GetLibrary()

(or put a watch on it), does the debugger confirm that oLibrary is a
TransparentProxy?

> Also, the CTRL.Library object inherits from
> MarshalByRef so I know it can be remoted.   I didn't think
> that I had to
> setup channels or sinks when using Component 
> Services/EnterpriseServices.  I know how to do this when doing 
> remoting but I'm not sure how it would work in the Component 
> Services/EnterpriseServices configuration.

You answered the first question I had, was wondering which direction the
error applied to.  For example, if you were setting a property, instead
of getting it; and you were passing a reference to an object on the
client side, and in the setter (over on the server), the setter tried to
invoke a method/etc - this would be a callback attempt from
server-to-client.  Ditto an attempt to register for an event.  So I was
wondering if it was the lack of a server channel on the client that was
the glitch.  But if you're just calling a getter, then that rules that
out.

You mentioned that CTRL.Library extends MBRO, but is that class marked
public?

Nothing's jumped out at me, but I don't use COM+ much/at all in recent
years.  But you ruled out the one common issue I was thinking of...

-Mike
Bear Canyon Consulting LLC
http://www.bearcanyon.com
http://www.pluralsight.com/mike

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to