Solved

Remoting: RegisterWellKnownClientType

Posted on 2008-10-31
3
544 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
Visual Studio 2013 Shortcut (VB) 4 34
Get id from json Data with NewtonSoft 3 34
ADO.NET ENTITY DATA MODEL 3 30
Get Client IP on RDS - VB.NET 15 25
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now