Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hooking into wcf pipeline

Tags:

c#

asp.net

wcf

Is there way inspect wcf method call. I means anything equal to HttpModule in asp.net.

I want execute a method before any method call.

like image 470
Saokat Ali Avatar asked Dec 17 '10 05:12

Saokat Ali


1 Answers

WCF has a very extensible architecture. It is possible to intercept and customize a lot of WCF functionality to do your own thing.

For your case you will have to write appropriate Service or Endpoint Behavior. The process between receiving a message from the transport channels and invoking your service method is called as dispatching. WCF uses a set of Behaviors to do the dispatching. You can provide your own Behavior to inspect the method calls.

This article provides an excellent overview and examples - Extending WCF with Custom Behaviors.

I would also suggest that you go through this WCF architecture overview http://msdn.microsoft.com/en-us/library/aa480210.aspx

like image 108
Unmesh Kondolikar Avatar answered Nov 05 '22 17:11

Unmesh Kondolikar