title: How to add the binding to the Config file of WCF?
body: <p>I am writing a WCF application for Accepting a file from android using POST and it throws a System.ServiceModel.ServiceActivation exception, I understood what is to be done from the from the link :-</p>
  
  <p><a href="https://stackoverflow.com/questions/2025700/system-servicemodel-serviceactivationexception-in-wcf-service">System.ServiceModel.ServiceActivationException in wcf service</a></p>
  
  <p>The following is the Web.config file </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  
      &lt;system.web&gt;
          &lt;compilation debug="true" targetFramework="4.0" /&gt;
      &lt;/system.web&gt;
      &lt;system.serviceModel&gt;
          &lt;behaviors&gt;
              &lt;serviceBehaviors&gt;
                  &lt;behavior name="Service1Behavior"&gt;
                      &lt;serviceMetadata httpGetEnabled="true"/&gt;
                      &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
  
                  &lt;/behavior&gt;
              &lt;/serviceBehaviors&gt;
              &lt;endpointBehaviors&gt;
                  &lt;behavior name="web"&gt;
                      &lt;webHttp/&gt;
                  &lt;/behavior&gt;
              &lt;/endpointBehaviors&gt;
          &lt;/behaviors&gt;
  
          &lt;services&gt;
              &lt;service name="WcfImageUpload.Service1"
                       behaviorConfiguration="ServiceBehaviour" &gt;
                  &lt;host&gt;
                      &lt;baseAddresses&gt;
                          &lt;add baseAddress="http://somesite.com:5555/Service1/" /&gt;
                      &lt;/baseAddresses&gt;
                  &lt;/host&gt;
                  &lt;endpoint name="Service1"
                            address=""
                            binding="webHttpBinding"
                            contract="WcfImageUpload.IService1" 
                            behaviorConfiguration="web"/&gt;
  
                  &lt;endpoint name="LoginServiceMex"
                            address="mex"
                            binding="mexHttpBinding"
                            contract="IMetadataExchange" /&gt;
              &lt;/service&gt;
          &lt;/services&gt;
      &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I need to add bindings </p>
  
  <pre><code>&lt;bindings&gt;
    &lt;webHttpBinding&gt;
      &lt;binding name="WebHttpEndpointBinding"&gt;
        &lt;security mode="TransportCredentialOnly"&gt;
          &lt;transport clientCredentialType="Windows"/&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/webHttpBinding&gt;
  &lt;/bindings&gt;
  </code></pre>
  
  <p>Where should I add that, I am a newbie in .NET and WCF.</p>