问题描述
您好,我实现了IDispatchMessageInspector接口来记录原始的请求/响应消息.我通过IEndpointBehavior接口应用它.它在大多数secenarios中都运行良好.但是我发现身份验证时不再记录消息 失败.(我在basicHttpBinding中使用TransportWithMessageCredential).因此,我开始调试WCF服务,并发现未调用检查器.这种情况怎么办?
问题要简单,错误应详细@错误/异常/寄生虫信息+操作系统+软件版本+所有问题的上下文. http://www.leoworks.net
Hello, I implement the IDispatchMessageInspector interface to log the raw request/response message. I apply it via the IEndpointBehavior interface. It works well in most secenarios. But I find the messages does not be logged any more when the authentication fail.(I use TransportWithMessageCredential in the basicHttpBinding). So I start to debug the WCF service and find the inspector doesn't be invoked. What happen to this case? Thanks in advanced.
问题要简单,错误须详细@错误/异常/堆栈信息+操作系统+软件版本+all the context of the issue Hope Helpful | http://www.leoworks.net
推荐答案
由于身份验证失败,因此会向客户端返回一条消息,并且不会调用调度程序.
Since authentication fails, a message is returned to the client, and the dispatcher is not invoked.
这篇关于如果安全认证失败,是否会触发IDispatchMessageInspector?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!