p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# (http://p2p.wrox.com/forumdisplay.php?f=22)
-   -   Events with IIS hosted remoting (http://p2p.wrox.com/showthread.php?t=57308)

koraykazgan May 1st, 2007 03:37 AM

Events with IIS hosted remoting
 
Hi there,

I want to program a remoting application, where the remotable object will be hosted in IIS. This should be a singleton object, because I need to exchange information between users.

Besides I will have a winForms application, which will activate that object and use it, as it were local. I have programmed such an application, but when I want to raise events, I am recieving deserialization errors.

The remotable class is inherited from MarshalByRefObject. I have defined a delegate outside the class. Besides I have written a class which is deriving from eventargs.

So I have defined an event in the remotable class.

I have analyzed many samples and articles about that problem, but I couldn't find a solution.

Can you help me with my problem? A sample program, which is working in this scenario would be best.

Thanks for help,
bye.

F/\nt/\sy PRODUCTIONS

planoie May 1st, 2007 03:49 PM

While I was experimenting with remoting I tried the very same thing. You can't do it. At least not with a single remoted object.

Think of the remoted object as an answering machine. You can call to it and leave a message. So can I. But the answering machine doesn't call me when you leave a message.

In order to achieve what you want (raise an event on the remote object that will propagate out to all clients of the remote object) you will need to build in two way remoting. The remote application will have to establish its own connection to the client in order to take an incoming remoting call and pass data to all the clients it is connected to.

-Peter


All times are GMT -4. The time now is 09:44 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.