Alex Rivera | Logout

Fire event when client connects to WCF-hosted endpoint

Asked 2009-04-02T21:01:19.600
13

What do I do in order to fire an event when a new client connects to WCF-hosted service?

EDIT: What I'm looking is to get an event when a new session is created or new Channel gets created for a client. Such as: for session closure I'm using:

OperationContext.Current.Channel.Closed += new EventHandler( Channel_Closed );

so what should I be using for session iitiation?

Edit
Report

1 Answer

0

Depends on your set up - do you do "per call" conversations? Then you don't really get any "client now connected" message per se....

Do you do session-based conversations? Your "ServiceHost" class has two events "Opening" and "Opened", which you can hook into, especially if you self-host your service.

What exactly is it you want to achieve by trapping this event?

Marc

answered 2009-04-02T21:05:43.257

Your Answer