查看http://msdn.microsoft.com/en-us/library/ms731303.aspx和http://msdn.microsoft.com/en-us/library/ms789007.aspx,给出了指定ServiceBehavior的示例,但是有没有办法在behaviorConfiguration中指定endpointBehavior?像
这样的东西 <service name="ServiceName1" behaviorConfiguration="ServiceBehavior1;EndpointBehavior1">
...
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior1">
...
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="EndpointBehavior1">
...
</behavior>
</endpointBehaviors>
</behaviors>
...
答案 0 :(得分:1)
愚蠢的问题,web.config的端点元素也有自己的behaviorConfiguration属性。
<endpoint
behaviorConfiguration="EndpointBehavior1" ...