TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mark dragan
NA
38
0
WCF client disconnect event
Aug 13 2009 10:51 PM
Hi everyone I need help with detecting client disconnect event.I made custom client behavior and apply it to the client.Client and service have duplex com. via NetNamedPipe and now I want to catch event when client just terminate application(call some methos on service side).I have implent IChannelInitializer:
public
void
Initialize(
IClientChannel
channel)
{
channel.Opened+=
new
EventHandler
(channel_Opened);
channel.Closed+=
new
EventHandler
(channel_Closed);
channel.Faulted+=
new
EventHandler
(channel_Faulted);
channel.Closing+=
new
EventHandler
(channel_Closing);
}
public
void
channel_Opened(
object
sender,
EventArgs
e)
{
ClientIntruder
.Instance.StopMeasure();
}
public
void
channel_Closed(
object
sender,
EventArgs
e)
{
ClientIntruder
.Instance.StopMeasure();
}
public
void
channel_Faulted(
object
sender,
EventArgs
e)
{
ClientIntruder
.Instance.StopMeasure();
}
public
void
channel_Closing(
object
sender,
EventArgs
e)
{
ClientIntruder
.Instance.StopMeasure();
}
and attach it throw:
clientRuntime.ChannelInitializers.Add(
ClientIntruder
.Instance) in EndpointBehavior.On channel_Opened method works but other methods don't work.What should I do?????
PLEASE HELP
THANKS IN ADVANCE
Reply
Answers (
3
)
Added WCF to project, now I have authentication popups
call service from another service