Questions tagged [idispatchmessageinspector]

IDispatchMessageInspector is an extension point in the .Net WCF library which allows a WCF message to a service to be intercepted prior to it being serviced and again before the response is sent to the client.

IDispatchMessageInspector is an extension point in the .Net WCF library which allows a WCF message to a service to be intercepted prior to it being serviced and again before the response is sent to the client.

50 questions
18
votes
5 answers

How do i get the invoked operation name within a WCF Message Inspector

I'm doing a message inspector in WCF: public class LogMessageInspector : IDispatchMessageInspector, IClientMessageInspector which implements the method: public object AfterReceiveRequest(ref Message request, IClientChannel channel,…
user297332
13
votes
5 answers

How to use IDispatchMessageInspector in a WCF Service?

I am trying to use IDispatchMessageInspector in a WCF service implementation to access custom header values. Something like: public class MyService : IMyService { public List GetNames() { var headerInspector = new…
Didaxis
  • 8,486
  • 7
  • 52
  • 89
12
votes
1 answer

IDIspatchMessageInspector

I Implement IDispatchMessageInspector.AfterReciveRequest Then I configure like this:
tzlil
  • 121
  • 1
  • 3
7
votes
1 answer

What is the difference between RequestInterceptor and MessageInspector?

I have two queries here :- 1) What is the basic difference between Microsoft.ServiceModel.Web.RequestInterceptor and System.ServiceModel.Dispatcher.DispatchRuntime.MessageInspectors (IdispatchMessageInterceptor) Both appears to be Request/Message…
Anil Purswani
  • 1,857
  • 6
  • 35
  • 63
7
votes
1 answer

WCF AfterReceiveRequest get headers

I just got started intercepting requests to my WCF service. I'm calling the web service with java code that looks like this ( short version ) connection =…
Lucas Arrefelt
  • 3,879
  • 5
  • 41
  • 71
6
votes
3 answers

How to I get the value of a custom soap header in WCF

I have created a custom soap header, and added it into my message via IClientMessageInspector public object BeforeSendRequest(ref System.ServiceModel.Channels.Message request, System.ServiceModel.IClientChannel channel) { var header…
Jason Coyne
  • 6,509
  • 8
  • 40
  • 70
4
votes
0 answers

WCF IDispatchMessageInspector To Pass Object Instance To Service Context

In my WCF Service. I have GetCustomerInfo Service I am intercepting WCF Message in AfterReceiveRequest Method. In AfterReceiveRequest i am creating an object instance of myClass which i want to use it in GetCustomerInfo service. I do not want to…
user2717619
  • 145
  • 1
  • 11
4
votes
1 answer

Shared information between a MessageInspector and a web-service

I have a question regarding sharing information between a MessageInspector and a web-service. I have an identifier (Guid) that I use to "bind" AfterReceiveRequest and BeforeSendReply. It works fine. But I would like this identifier to be available…
3
votes
0 answers

WCF Message inspectors concurrency model

I have implemented message layer security using message inspector mechanism in a wcf service. On the client side, in IClientMessageInspector.BeforeSendRequest I add an authentication header. On the service side, in…
Vishal Shah
  • 3,774
  • 4
  • 23
  • 25
3
votes
1 answer

Adding WCF Message Inspectors at Runtime

I have created a custom ServiceHost that I would like to use to automatically add a message inspector to every endpoint of a service that is running on it. I have created a MessageInspector that implements IDispatchMessageInspector and…
mclark1129
  • 7,532
  • 5
  • 48
  • 84
3
votes
1 answer

How can I get the exception object inside a IDispatchMessageInspector?

My WCF application uses an IDispatchMessageInspector for some advanced monitoring - when an error occurs and when no error occurs. I'm looking for a way to get the exception that occurred in my service when I get to the…
Amir Popovich
  • 29,350
  • 9
  • 53
  • 99
3
votes
0 answers

How and where to implement the IDispatchMessageInspector

Based on the SO question: How to use IDispatchMessageInspector in a WCF Service? I am still confused on where to implement the methods that execute code to "do something" with the inspected message. From reading IDispatchMessageInspector it appears…
Popo
  • 2,402
  • 5
  • 33
  • 55
3
votes
1 answer

wcf idispatchmessageinspector BeforeSendReply not called

I've implemented idispatchmessageinspector in my service. I did not want to do this as an attribute. I want the BeforeSendReply to add additional data into the header. the problem I have is that it is not being called and the header is returned…
Azad
  • 31
  • 3
3
votes
1 answer

Unable to make IDispatchMessageInspector work

I need to play with request header in a REST, Json, WCF web service. I create my IDispatchMessageInspector public class HeaderInspector : IDispatchMessageInspector { public object AfterReceiveRequest(ref System.ServiceModel.Channels.Message…
PSV
  • 31
  • 3
2
votes
3 answers

Using IDispatchMessageInspector to get request's remote address

I'm trying to follow this blog post: http://blogs.msdn.com/b/carlosfigueira/archive/2011/04/19/wcf-extensibility-message-inspectors.aspx My aim is to somehow get the remote address of the incoming request, but for some reason the address either is…
rafale
  • 1,704
  • 6
  • 29
  • 43
1
2 3 4