remoting and delegates

Hello all,

I was wondering are there any samples/tutorials that handle .net remoting and delegates? For example: if you have 2 objects where object a makes a call to b and returns immediately. Then after some time some event happens in object b, I then want to notify object a that event has happened...

any help would be appreciated
thanks!
-ken

[374 byte] By [KenY] at [2008-1-19]
# 1
There are some examples in the .NET Framework SDK on .NET Remoting and delegates. For example, assuming that you have installed the SDK with VS .NET 2003, you would find it here:

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Technologies\Remoting\Advanced\AsyncDelegate

Note that both client and server (or the two peers) need to be aware of the delegate definition. Here's a Microsoft KB article detailing a problem in their chat sample: http://support.microsoft.com/default.aspx?scid=kb;en-us;312114

Another caveat is that using a delegate to call back from server to client is not firewall friendly. If you have to go through any firewall that you don't control, don't expect it to work. If you have a firewall that you do control, you'll have to open the appropriate ports and possibly forward the port to the correct machine to get everything working properly.

I would also read my comment on .NET Remoting (http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=753). If you're starting a new application, you might want to consider other technology options before .NET Remoting.

JamesKovacs at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...

.NET Development

Site Classified