Here is the scenario... I have a service like this
public class Service : IServiceContract, IServiceBehavior
{
public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
{
foreach(ChannelDispatcher chDisp in serviceHostBase.ChannelDispatchers)
{
foreach(var epDisp in chDisp.Endpoints)
{
epDisp.DispatchRuntime.MessageInspectors.Add(new CustomInspector());
}
}
}
}
The problem is the message inspector does not fire AfterReceiveRequest
or BeforeSendReply
when hitting the service directy (http://localhost/Service.svc). I am wanting to do some customization of the html page returned(that lists the WSDL location).
The inspector fires as expected when calling any operations on the service, but not when accessing the service endpoint directly.
The web.config has the a single endpoint defined, basicHttpBinding
. httpGetEnabled=true
as well.