[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Matt Osborne

6/5/2004 12:35:00 AM

Hello:

I have a client server application that I am currently developing and have
some issues that I feel can be best resolved using a custom ObjRef child
class. I have created the class OK, and have overridden my
MarshalByRefObject child class so that the CreateObjRef returns an instance
of my new custom ObjRef derivative.

I can see the server create my ObjRef class and I can also see my ObjRef
class being serialized by the server, but It appears that my ObjRef class is
never deserialize by the client. Does anybody else have experience with
custom ObjRef classes and if so, is there something that I need to be doing
to get my MarshalByRefObjects to be marshaled using my ObjRef class?

Thank you for your help

Matt Osborne


1 Answer

Lostinet[MS DOTNET MVP]

6/6/2004 4:44:00 AM

0

HI,
When your MBRO marshal to client site,the CreateObjRef would never be
called at client site because the real MBRO is at server site.

When the client get the info of the MBRO of server,dotnet will
deserialize it to the normal ObjRef class. And then, dotnet will create a
RealProxy and use RemotingService.Unmarshal to combine the ObjRef and
RealProxy into TransparentProxy.

What you get the object at the client site is just the TransparentProxy.
When you invoke methods on the TransparentProxy, the RealProxy.PrivateInvoke
will be called, and the methodcall information will be send to the server
and invoke the real object.

The child class of ObjRef is not important. you should set the
ObjRef.ChannelInfo/EnvoyInfo/TypeInfo as your custom info class. these infos
would be serialize at server and deserialize at client, these would be more
helpful.

--


Thanks.

Lostinet (MS .NET MVP)
lostinetweb@hotmail.com
---------------------------
Need MessageBox,ComboBox,DatePicker,PasswordBox,TreeView,ASP.Net RPC ?
http://www.los...
---------------------------
Get ContextBoundModel For AOP.NET!
http://www.contextbound...
---------------------------

"Matt Osborne" <private@stupidSpamer.net> &#208;&#180;&#200;&#235;&#207;&#251;&#207;&#162;
news:cz8wc.65295$hL5.29581@newssvr29.news.prodigy.com...
> Hello:
>
> I have a client server application that I am currently developing and have
> some issues that I feel can be best resolved using a custom ObjRef child
> class. I have created the class OK, and have overridden my
> MarshalByRefObject child class so that the CreateObjRef returns an
instance
> of my new custom ObjRef derivative.
>
> I can see the server create my ObjRef class and I can also see my ObjRef
> class being serialized by the server, but It appears that my ObjRef class
is
> never deserialize by the client. Does anybody else have experience with
> custom ObjRef classes and if so, is there something that I need to be
doing
> to get my MarshalByRefObjects to be marshaled using my ObjRef class?
>
> Thank you for your help
>
> Matt Osborne
>
>