Reputation: 4123
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?
Upvotes: 14
Views: 4470
Reputation: 13849
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).
Upvotes: 15