简体   繁体   中英

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

    <endpoint
      behaviorConfiguration="EndpointBehavior1" ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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