Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - Remote event possible with WCF ?

 
 
Old 04-01-2006   #1 (permalink)
Guillaume


 
 

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 SpecsSystem Spec
Old 05-10-2006   #2 (permalink)
Sean @ OT


 
 

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 SpecsSystem Spec
 

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46