Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Remote event possible with WCF ?

 
 
Thread Tools Display Modes
Old 04-01-2006   #1 (permalink)
Guillaume
Guest


 

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


 

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.

 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista Remote Event Log viewer mlai Vista networking & sharing 12 11-05-2007 11:24 PM
Vista Remote Event Log viewer mlai Vista performance & maintenance 6 11-05-2007 09:53 AM
PowerShell Event Logs (read and write) (Local and Remote) jeronimo PowerShell 1 09-21-2007 03:43 PM
How to Backup remote Event Log Kingpinofdisks PowerShell 4 09-17-2007 03:41 PM
Querying a number of servers for a specific Event ID -Remote? Kevini PowerShell 1 12-18-2006 03:37 PM








Vistax64.com 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 2005-2008

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 47 48 49 50