Hello,
I am currently building a custom binding which gets HTTP requests from a different source than from a listening TCP socket. When I access and open a channel directly, there are no problems. However, problems occur when I try to host my binding in an endpoint of a WebServiceHost.
I've inserted Console.WriteLine() debug messages into every function of my custom binding's code. Everything works fine until after the OnOpen() function of my ChannelListener has been called. Afterwards, the ServiceModel just doesn't want to invoke the OnAcceptChannel() method. No exceptions, no error message; it just hangs there and doesn't call any other function of my binding anymore. I've commented the output of the application into the code below.
WebServiceHost host = new WebServiceHost(
typeof(MyService), new Uri("http://localhost:80"));
host.AddServiceEndpoint(typeof(MyService), new MyWebHttpBinding(), "");
// BINDING CONSTRUCTOR
// BINDINGELEMENT CONSTRUCTOR
host.Open();
// BINDING: CreateBindingElements (multiple times)
// BINDINGELEMENT: Clone
// BINDINGELEMENT CONSTRUCTOR
// BINDINGELEMENT: CanBuildChannelListener
// BINDINGELEMENT: Clone
// BINDINGELEMENT CONSTRUCTOR
// BINDINGELEMENT: CanBuildChannelListener
// BINDINGELEMENT: Clone
// BINDINGELEMENT CONSTRUCTOR
// BINDINGELEMENT: Clone
// BINDINGELEMENT CONSTRUCTOR
// BINDINGELEMENT: Clone
// BINDINGELEMENT CONSTRUCTOR
// BINDINGELEMENT: BuildChannelListener
// CHANNELLISTENER CONSTRUCTOR
// BINDINGELEMENT: Clone
// BINDINGELEMENT CONSTRUCTOR
// BINDING: CreateBindingElements (multiple times)
// CHANNELLISTENER: OnOpen
// CHANNELLISTENER: OnOpen END (function completes properly. last output)
Does anybody of you know what I have to change in my application that the OnAcceptChannel method gets called properly?
Cheers