Remoting: RegisterWellKnownClientType

Posted on 2008-10-31
Last Modified: 2013-11-07

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?

Question by:AWestEng
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

Accepted Solution

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.

Author Comment

ID: 22851186
Thx Heathcliff74 for sorting this out for me.. :)

Author Closing Comment

ID: 31511969
Perfect!! :)

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…

717 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