.Net Remoting: Common Remoting Problems

   I have talked with a few people who have had a few common errors that I have also experienced myself when trying to write a remoting application. I thought I would provide a couple of them and their solutions.
Note: These errors often occur after reading and trying to follow examples such as the GotDotNet Remoting Overview or the SDK’s Remoting Events Technology Sample.

  1. TcpChannel is already registered…
    • This error occurs when you are trying to run both the server and client in the same memory space. Write a separate executable (or whatever you are using) to start each of the server and client.
  2. An unhandled exception of type ‘System.IO.FileNotFoundException’ occurred in mscorlib.dll
    File or assembly name <insert project name>, or one of its dependencies, was not found.
    • This error occurs when trying to sink events from your remoted object into something else. The problem (as I have seen it) often comes from trying to follow the Remoting Events Technology Sample in the SDK. Online, Microsoft has provided a fix to the problem. If you follow the instructions in the knowledge base article, you will be able to resolve this issue, gain enlightenment, and prevent grey hair proliferation.
  3. The remoting proxy has no channel sink…
    • This error occurs in the remoting client and is cause by the registering of the TcpChannel. In the examples provided at GotDotNet for how to ‘Create a Client of the Server’, they pass no arguments to the TcpChannel object. Ingo Rammer, remoting guru, provides a nice explanation as to what happens when you do this, and that you are likely desiring to pass a ‘0’ to the constructor in this newsgroup thread.

If you have any others you feel should be added to the list, please feel free to forward them to me. If you want to learn more about remoting, my recommendation is to read Ingo Rammer’s Remoting FAQ first. He is, by far, the most knowledgeable person when it comes to remoting and if says to do something you should probably do it. He has been kind enough to provide a method for which to contact him on his web site. I recommend that you at least give a good read to the zillions of resources out there for remoting before you bother though. He is a busy guy and should be allowed to have his mind focussed on the advanced issues rather than the beginner ones (IMHO). He’s really good about posting what he finds.

The information on this page is provided "AS IS" with no warranties, and confers no rights.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s