Re: Have WCF Callback notify a single client ?



Thanks for sticking with me. It all makes sense now, especially after
creating a complete working version - the piece i was completely missing was:

<ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession,
ConcurrencyMode:=ConcurrencyMode.Multiple)> _

The PerSession makes sense, i was assuming it was always a singleton, thus
all clients were using the same 'instance' of the object - obv. not so with
PerSession.

Thanks again for your help. Have a great one !!!



"Dominick Baier" wrote:

yep ;)
-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)

OK, this may be the part i was missing. So each CallBackChannel is
specific to only one user?

:-)

"Dominick Baier" wrote:

how about storing the callback reference in a dictionary<string,
channel> that maps the user to a callback channel?

-----
Dominick Baier (http://www.leastprivilege.com)
Developing More Secure Microsoft ASP.NET 2.0 Applications
(http://www.microsoft.com/mspress/books/9989.asp)

Hello Dominick, thank you so much for your response.

Questions tho:

" you either use the duplex support in WCF to store the
CallbackChannels internally and call back through them whenever an
event occurs."

If we have a callback that users subscribe to, how do we alert only
a particular client named 'flappy' that has subscribed to the
callback?

"Or have your own infrastructure where the client news up a
ServiceHost and you pass a callback URI to the service for later
notification."

Im still missing the part of how to raise the event for only a
specific user - or am i thinking too hard? ie:

For instance if 3 users subscribed to the event SomethingHappened();
How can i say raise the event SomethingHappened() only for user
number 2?

For some reason im having a hard time grasping how this would
actually work.

Thanks again for your comments, i hope to hear more :-)

"Dominick Baier" wrote:

Hi,

sure -

you either use the duplex support in WCF to store the
CallbackChannels internally and call back through them whenever an
event occurs.

Or have your own infrastructure where the client news up a
ServiceHost and you pass a callback URI to the service for later
notification.

-----
Dominick Baier (http://www.leastprivilege.com)
Developing More Secure Microsoft ASP.NET 2.0 Applications
(http://www.microsoft.com/mspress/books/9989.asp)
Hello,

Was wondering how or if this is possible - assuming the use of
FullDuplex, but open to whatever works well.

Goal:
Have x number of clients subscribe to a WCF fullduplex over tcp
service --
lets say they subscribe to:
DoIhaveMail()
On the server side, lets say we have an object that is alerted
when
a sql table gets a new row, this object then invokes the
IHaveMailOccured Event --
If this new row added to the table was mail for user b, how do i
callback only user b to say 'you have mail.' ?

I have read about Publish/Subscribe using Callbacks, streams and
MSMQ -- but its as tho the server alerts all clients who
subscribed to that channel.

Thanks in advance :-)




.



Relevant Pages

  • Re: Have WCF Callback notify a single client ?
    ... Dominick Baier ... channel> that maps the user to a callback channel? ... If we have a callback that users subscribe to, ... a particular client named 'flappy' that has subscribed to the ...
    (microsoft.public.dotnet.security)
  • Asynchronous sockets and pooled thread loading
    ... dozen simultaneous connections from remote clients to remote servers. ... I understand that when a send or receive completes, the callback will be ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Have WCF Callback notify a single client ?
    ... this may be the part i was missing. ... that maps the user to a callback channel? ... Dominick Baier ... particular client named 'flappy' that has subscribed to the callback? ...
    (microsoft.public.dotnet.security)
  • Events between machines
    ... Don't use events (callback) between machine, ... Assume one server and several clients, all on the same subnet (datalayer is ... Assume the server send small udp packets without actual data, ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Have WCF Callback notify a single client ?
    ... you either use the duplex support in WCF to store the CallbackChannels internally and call back through them whenever an event occurs. ... Or have your own infrastructure where the client news up a ServiceHost and you pass a callback URI to the service for later notification. ... Have x number of clients subscribe to a WCF fullduplex over tcp ... -- but its as tho the server alerts all clients who subscribed to that ...
    (microsoft.public.dotnet.security)