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?
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With