Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remoting Eception on Client

Status
Not open for further replies.

MadJock

Programmer
May 25, 2001
318
GB
Hi All,

I have an issue which I shall try to describe below. I've also found a solution that I will link to... my main issue is I'm not sure how to implement the solution!

I have a windows service running on a server. This service implements a plugin model where there are objects running in a secondary AppDomain (required so you can update the plugins without bringing the service down).

These windows services expose themselves by registering a server channel for .Net remoting. The particular call I'm experriencing difficulties with is the GetStatusReport() call where the server will go through each plugin, get it's status (e.g. last error, last successful call, etc) and summarise the information before returning the status report as an object to the remote client.

Psuedocode (I can post actual code if necessary but don't want to complicate the question!):
Code:
// This is the client side
Register client channel
Activate remote object
Call getStatusReport
Add status report to collection
Unregister client Channel

The statusReport object has a list of StatusItems. I can access this list no problem. However, when I try to access a property of StatusItem, I get the following error:

This remoting proxy has no channel sink which means either the server has no registered server channels that are listening, or this application has no suitable client channel to talk to the server.

Both the StatusReport and StatusItem classes inherit from MarshallByRefObject and override the InitialiseLifetimeService method to return null.

I found the following description and solution, however, I can't see how the solution makes sense - to my knowledge you can only register a single server channel with the same port and end-point. The remote object that creates the StatusReport does not exist in the secondary AppDomain so there would be no point in haviung the only registered server channel there.

Solution: (read the 'second case' which I believe is closer to my problem).

Any advise or help would be very much appreciated!

Regards,

MadJock
 
Hi,

I've solved this using my own solution. It doesn't 'feel' right so I'd still be interested to hear better ideas!

Basically, in my service (primary appdomain) on the server, I collate the StatusItems returned from the object in the secondaryy AppDomain and create a deep copy. These are then the items that are returned to the client.

I believe this works as the channel exists between the client and the primary AppDomain on the server.

Hope this helps someone else struggling with this issue.

Thanks,

MadJock


"Just beacuse you're paranoid, don't mean they're not after you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top