Solved

Remoting: RegisterWellKnownClientType

Posted on 2008-10-31
3
550 Views
Last Modified: 2013-11-07
Hi!

I need some help to explaine the RegisterWellKnownClientType.

I have a several servers and a clients that  should all  communicate with each other via remoting,
I'm not sure if I only should use interfaces and skip register the objects for the client.

Is there any downsides not to use the  RegisterWellKnownClientType?

Thx
0
Comment
Question by:AWestEng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
Heathcliff74 earned 500 total points
ID: 22849065
If you have several servers and you want the clients to be able to use different servers for the same type, you don't want to use RegisterWellKnownClientType, because that will limit you to use only one single server for that specific type.

Using RegisterWellKnownClientType for server activated objects
Pro: You can create an object completely transaparant, like this: ServerType myObject = new ServerType();
Con: Your object will always be hosted on the server where you registered your type and it is not possible to unregister

If you want to use multiple servers, you should activate (server-activated) your object like this:
ServerType myObject = (ServerType)Activator.GetObject(typeof(ServerType), "http://localhost:8081/RemoteObj");

Everytime you instantiate a remoting object, you can decide on the url of the host.
0
 
LVL 1

Author Comment

by:AWestEng
ID: 22851186
Thx Heathcliff74 for sorting this out for me.. :)
0
 
LVL 1

Author Closing Comment

by:AWestEng
ID: 31511969
Perfect!! :)
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question