basicHttpBinding configuration of wcf service (Server and client configuration )

Thursday 22 January 2015

basicHttpBinding configuration of wcf service (Server and client configuration )

basicHttpBinding configuration of wcf service (Server and client configuration )

SERVER Config file : 
 <behaviors>
          <serviceBehaviors>
   <behavior name="S2L">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <dataContractSerializer maxItemsInObjectGraph="2147483646" />
       
        </behavior>

  <bindings>
      <basicHttpBinding>
   <binding name="BasicHttpBinding_name" closeTimeout="00:10:00"
          openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="2147483647" maxBufferSize="2147483647"maxReceivedMessageSize="2147483647"
            textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
          messageEncoding="Text">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
            maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>

 <services>
 <service name="UploadPdf"  behaviorConfiguration="S2L" >
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_name"
     contract="IUploadPdf"/>
      </service>


Client Configuration  :

<bindings>
   <basicHttpBinding>
     <binding name="BasicHttpBinding_IUploadPdf" >
     
       
     </binding>
</basicHttpBinding>

 <client>
   <endpoint address="Hosted service address"
    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_name"
    contract="service reference namespace . interface name" name="BasicHttpBinding_name" />
</client>