Ok - I have basically got the remoting working, but it's not working
"right".

I wanted to be able to have any number of clients monitor any number of
servers receiving events when a state change occurred. This I have
achieved - sort of.

On the server side, I registered a WellKnownServiceType of my object,
and set it to singleton. The clients connect to it via
Activator.GetObject, and that works fine for the first connect and all
events work. Subsequent connects will get an object reference, register
their event handler and no events ever get raised to it. By subsequent
connects I mean by stopping and restarting the client app. Restarting
the service on the server will allow the client to connect again
properly.

I'm at a loss for explanations as I can't see anything wrong - I get no
errors at all on the subsequent runs, just nothing happens. I know I
have a valid object because I can manually retrieve its status. And the
object is still raising the events, because the service is logging the
events to the eventlog. I just get no more remote events.

I thought of trying an ActivatedServiceType so I could get a separate
instance of my class for each client (which internally calls a static
class now for the COM port stuff) but that can't be called from
Activator.GetObject (as far as I can see) and I wanted to be able to
dynamically add more and more servers to monitor - so I think I am stuck
with WellKnownServiceType. And I can't see how SingleCall would work at
all.

So now I am thinking that really I need to open TCP ports myself, and do
the communications manually - would that be a fair guess, or have I
missed something somewhere?

TIA

Dino

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 07/05/2002

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to