Listener won't accept new channel after first one is finished
Hey,
This is on the server side, where a ServiceHost is used.
Without security this was what usually happened (using reliable messaging though):
- In the Listener, OnBeginAcceptChannel() is called, and an async setup of communication is done. When ready OnEndAccept() is called, and a ReplyChannel is returned.
- On this channel ReceiveRequest() is called and a RequestContext is returned.
- Using the RequestContext.Reply() a reply is sent.
- Back to (1), where a new channel is created for the next message...
And now to the problem. For some reason (4) is never reached while using security. Instead ReceiveRequest (2) keeps being called. I figure this might be because the same channel is supposed to handle the whole secure session, instead of a new channel being created for each message? But, even after the whole secure (and RM) session is over, the BeginReceiveRequest (2) keeps being called, and the channel never dies. Which means the Listener never creates a new channel. I'm thinking I might be missing some call to a Close() or Dispose() method or something, somewhere? But why would I have to explicitly call something like that now with security, but not before? Might there be something special I should do in RequestContext.Close() or dispose? In there I only call Message.Close() right now. So, basically, I was hoping someone would know how to make the channel die, and get the Listener to start accepting a new channel. Thanks,
Now, with security, BeginReceiveRequest is called in (2) instead of the sync version used before.
Pat

