简体   繁体   English

同时指定ServiceBehavior和EndpointBehavior的语法?

[英]Syntax to Specify both ServiceBehavior and EndpointBehavior?

Looking at http://msdn.microsoft.com/en-us/library/ms731303.aspx , and http://msdn.microsoft.com/en-us/library/ms789007.aspx , examples are given which specify ServiceBehavior, but is there a way to specify an endpointBehavior in the behaviorConfiguration as well? 查看http://msdn.microsoft.com/en-us/library/ms731303.aspxhttp://msdn.microsoft.com/en-us/library/ms789007.aspx ,给出了指定ServiceBehavior的示例,但是也可以在behaviorConfiguration中指定一个endpointBehavior吗? Something like 就像是

  <service name="ServiceName1" behaviorConfiguration="ServiceBehavior1;EndpointBehavior1"> 
...
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior1">
...
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="EndpointBehavior1">
...
        </behavior>
      </endpointBehaviors>
    </behaviors>
...

Silly question, The endpoint element of the web.config also has its own behaviorConfiguration attribute. 愚蠢的问题,web.config的终结点元素也有自己的behaviorConfiguration属性。

    <endpoint
      behaviorConfiguration="EndpointBehavior1" ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM