tags:

views:

227

answers:

1

Is there some uniform way I can implement behavior that occurs around a set of WCF service calls? I'm looking for a simple way to handle cross-cutting behavior like logging, initialization, error handling, authorization etc. With ASP.NET a lot of this is easy to implement as an HTTPModule.

Any helpful suggestions?

+2  A: 

There are a whole bunch of extensibility points in WCF you can use for stuff like this. They include:

Additionally, you can create custom ServiceHost classes to use either directly or through ServiceHostFactory, and then there's the entire channel stack model which is pretty extensible (if a bit complex at times).

tomasr
Thanks for a bunch of good options! It's going to take me a while to make sense of which approach works best in different scenarios and how to wire it all up.
Eric Nicholson