Solved

Remoting: RegisterWellKnownClientType

Posted on 2008-10-31
3
547 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
in Dot net,lastest version of MVC 3 25
vb.net help 4 31
VB.net and sql server 4 36
Release Dynamically Allocated Memory in C# 3 28
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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.

831 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