下图上半部分是正常的访问。
下半部分通过插入一个EndPointBehavior,起到类似aop的作用,可以用于篡改message,做一些类似监控的事情 。

勇哥注:
此系列文章是梳理一下勇哥认为项目有用的WCF的知识点,读者须有WCF的开发经验。
1:WCF异常在配置文件
<configuration> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="serviceDebuBehavior"> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> <services> <service name="Artech.WcfServices.Service.CalculatorService" behaviorConfiguration="serviceDebuBehavior"> <endpoint address="http://127.0.0.1:3721/calculatorservice" binding="ws2007HttpBinding" contract="Artech.WcfServices.Service.Interface.ICalculator" /> </service> </services> </system.serviceModel> </configuration>
Powered By Z-BlogPHP 1.7.3
Copyright www.skcircle.com Rights Reserved.