![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Remote event possible with WCF ? Hi, I'd like to know if i can have this type of behavior : I have a object "SeverMonitor" which has 2 events "EventA" and "EventB". When i create an instance of ServerMonitor it will periodically poll a database and raise EventA or EventB based on some data. I know how to do this. Now i'd like to make ServerMonitor an Single Remote Object and have client apps adding event handlers to EventA and EventB and when i raise EventA or EventB, all clients will be called. It looks like a duplex contrat but i don't want to have a server object for each client (PerSession) but a Single server object. Of course i could use something else as events like calling a OnWay method to register to an event (RegisterEventA) and my server object will keep a callback for each client... Anyone knows if it's possible to have this type of behavior ? Thanks Guillaume R. |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Remote event possible with WCF ? Well according to http://msdn.microsoft.com/winfx/defa...s/default.aspx "Windows Communication Foundation does not allow you to pass object references across service boundaries." So my thought is that even using the Session enabled (PerSession) services will not enable this kind of functionality. It will however keep a reference to one instance, so if that instance is doing some polling and the client runs off to do other work the client could in theory poll that instance for a change in the situation. Actually in that scenario you might want to consider the InstanceContextMode.Single ServiceBehavior ... What kind of client to you forsee needing this functionality ? (web, thick, other application) -Sean "Guillaume" wrote: > Hi, > I'd like to know if i can have this type of behavior : > > I have a object "SeverMonitor" which has 2 events "EventA" and "EventB". > When i create an instance of ServerMonitor it will periodically poll a > database and raise EventA or EventB based on some data. I know how to do this. > Now i'd like to make ServerMonitor an Single Remote Object and have client > apps adding event handlers to EventA and EventB and when i raise EventA or > EventB, all clients will be called. > It looks like a duplex contrat but i don't want to have a server object for > each client (PerSession) but a Single server object. > Of course i could use something else as events like calling a OnWay method > to register to an event (RegisterEventA) and my server object will keep a > callback for each client... > > Anyone knows if it's possible to have this type of behavior ? > > Thanks > > Guillaume R. |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Vista cannot access Event Log on a remote XP | General Discussion | |||
| Vista Remote Event Log viewer | Vista networking & sharing | |||
| Vista Remote Event Log viewer | Vista performance & maintenance | |||
| How to Backup remote Event Log | PowerShell | |||
| Querying a number of servers for a specific Event ID -Remote? | PowerShell | |||