Identify on which Contract was a WCF service called

前端 未结 1 796
执笔经年
执笔经年 2020-12-11 12:07

My question is: Is possible to know wich contract has been called in a multiple contract service? In this, case, in the constructor.

The implementing class of the se

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

    I think what you want to implement is a WCF Message Inspector. A MessageInspector is a "message filter" that can intercept and inspect the messages coming in or going out of the service layer infrastructure.

    On the server, you would implement the IDispatchMessageInspector Interface.

    Here is a pretty good example:

    http://www.aspnet4you.com/wcf/index.php/2013/01/30/message-interception-auditing-and-logging-at-wcf-pipeline/

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