Configuration to be done for Activation of WCF Service

Posted by jineesh uvantavida on Tuesday, November 14, 2017 Under: c#
The below configuation to be added in the web.config or app.config for the proper functioning of WCF Service.


 <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="Service1_Behavior">
          <serviceMetadata httpGetEnabled="True"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service name="Namespace1.Service1"
               behaviorConfiguration="Service1_Behavior">
        <endpoint address="url of wcf service created" binding="basicHttpBinding" contract="Namespace1.IService1"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
  </system.serviceModel>

In : c# 


Tags: wcf service  wcf configuration 

Translate This Page

 


Make a free website with Yola