O'Reilly logo

ASP.NET Web API by Joydip Kanjilal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying service behavior

You can use the ServiceMetadataBehavior attribute element to configure a behavior to apply to a service. This can be done with the following code:

<behaviors>
    <behavior>
        <ServiceMetadata httpGetEnabled="true" /> 
    </behavior>
</behaviors>
<services>
    <service 
       name="DemoService"
       <endpoint 
          address="http://Joydip-PC:8080/Demo"
          contract="IDemoService"
          binding="basicHttpBinding" />
       </endpoint>
    </service>
</services>

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required