Don't give up Dino, here is the solution. The explanation you will see while typing these couple of line of code into the place where your service class calls the event(s).
public delegate void MyDelegate(); public event MyDelegate OnMyEvent; ... void NotifySubscribers() { foreach(MyDelegate d in OnMyEvent.GetInvocationList()) { try{ d(); } catch{ OnMyEvent -= d; } } } Best, stef On Sun, 12 May 2002 12:04:50 +1200, Dean Cleaver <[EMAIL PROTECTED]> wrote: >Ravi, > >Yes - there will be instances where after registering for remote events >that the client app gets shut down. However, on shutdown I "de-register" >the events however this seems to make no difference. The TcpChannel is >created with a port of 0 such that it knows to listen for callbacks - >and I thought that if I tried to create a TcpChannel with a given port >it becomes a server channel, not a client channel. > >Yes it's fine for clients to miss events - they are for information >purposes only. The server ignores the failed attempts to notify the >clients on it's own, as I have no try catch block and get no errors at >all. > >I could post the code, however it's all pretty "normal". Besides - it >works. Once. On restart it doesn't work again - that's all. > >Thanx for the thoughts. >Dino > >-----Original Message----- >From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of >Ravi Ragunathan >Sent: Sunday, 12 May 2002 04:09 >To: [EMAIL PROTECTED] >Subject: Re: [DOTNET] Difficult remoting situation (was: Remoting >problems...) (longish) > > >It seems from ur post after registering for remote events you shutdown >and restart your application.For it to work right you would have the >client listener to be registered at the same endpoint everytime it >starts up.( u would need to have the client object register at the same >port as it originally registered with the server each time it starts >up). > >Also I assume it is OK for clients to miss events when they are not up >and in your server u ignore failed attempts to notify the clients >without removing them from ur list of interested subscribers. > >It might also help if u post the code u use to do this so others can >find the problem. > >--- >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. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.