Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Remoting: RegisterWellKnownClientType

Posted on 2008-10-31
Medium Priority
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
  • 2

Accepted Solution

Heathcliff74 earned 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Loops Section Overview
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

564 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