Tag: idispatchmessageinspector

IDIspatchMessageInspector

我实现了IDispatchMessageInspector.AfterReciveRequest然后我这样配置: 但它不起作用。 我检查我的程序集和我的本地参考,我没有找到Microsoft.WCF.Documentation.InspectorInserter或HostApplication DLL我在网上搜索下载HostApplication DLL但我什么也没找到。 我需要做什么? 我需要实现更多的东西,或者我只需要这个配置。

如何在WCF服务中使用IDispatchMessageInspector?

我试图在WCF服务实现中使用IDispatchMessageInspector来访问自定义标头值。 就像是: public class MyService : IMyService { public List GetNames() { var headerInspector = new CustomHeaderInspector(); // Where do request & client channel come from? var values = headerInspector.AfterReceiveRequest(ref request, clientChannel, OperationContext.Current.InstanceContext); } } 我已经实现了自己的IDispatchMessageInspector类。 public class CustomHeaderInspector : IDispatchMessageInspector { public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext) { var prop = […]