REST Configuration

 

Client configuration with WCF (Windows Communication Foundation)

Add the following entries in web.config file to enable REST

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    ...
    <behaviors>
        ...
        <endpointBehaviors>
            <behavior name="restBehavior">
                <webHttp/>
            </behavior>
        </endpointBehaviors>
    </behaviors>
    <services>
        <service behaviorConfiguration="MailUp.WS.Host.Web.MailUpServiceBehavior" name="MailUp.WS.Service.MailUpService">
        <endpoint  address="rest" binding="webHttpBinding" contract="MailUp.WS.Contract.IMailUpService" behaviorConfiguration="restBehavior"/>
        ...
    </services>
    ...
</system.serviceModel>