What is the WCF equivalent of an HTTPModule?

前端 未结 1 1054
眼角桃花
眼角桃花 2020-12-18 21:12

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 li

相关标签:
1条回答
  • 2020-12-18 21:56

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

    • IDispatchMessageInspector
    • IErrorHandler
    • IParameterInspector
    • Behaviors (IServiceBehavior, IEndpointBehavior, IOperationBehavior)

    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).

    0 讨论(0)
提交回复
热议问题