473,387 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Custom ObjRef class

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
Jul 21 '05 #1
1 1718
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)
lo*********@hotmail.com
---------------------------
Need MessageBox,ComboBox,DatePicker,PasswordBox,TreeVie w,ASP.Net RPC ?
http://www.lostinet.com/
---------------------------
Get ContextBoundModel For AOP.NET!
http://www.contextboundmodel.net/
---------------------------

"Matt Osborne" <pr*****@stupidSpamer.net> дÈëÏûÏ¢
news:cz*******************@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

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Neil Zanella | last post by:
Hello, In Python, classes are objects. But there is no way to custom print a class object. This would require some syntax such as the one commented out below: With the current "foo =...
7
by: Luc Tremblay | last post by:
Given the typical following code: void Listener::HandleEvent(const Event& event) { // handling code } In a "clean" fashion, how is it possible to add custom data (to be subsequently...
1
by: Matt Osborne | last post by:
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,...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
7
by: John Grandy | last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled with instances of a custom class. The custom class is defined in a Class Library that is included in the web-service...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
9
by: Greger | last post by:
Hi, I am building an architecture that passes my custom objects to and from webservices. (Our internal architecture requires me to use webservices to any suggestion to use other remoting...
11
by: Pete Kane | last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would contain tab pages of my own classes, I know you can achieve this with...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.