title: Add HTTP and HTTPS Binding to a WCF Webservice
body: <p>I have a WCF Werbservice and i want to reach him via HTTP and HTTPS. </p>
  
  <p>This is my actual try. But i can't reach the Service anymore not with http and not with https. :( Pls help</p>
  
  <pre><code>&lt;system.serviceModel&gt;
    &lt;bindings&gt;
     &lt;basicHttpBinding&gt;
      &lt;binding name="DefaultBinding" closeTimeout="10:01:00" openTimeout="10:01:00" receiveTimeout="10:10:00" sendTimeout="10:01:00"
          transferMode="Streamed"
          maxBufferSize="104857600" maxBufferPoolSize="524288000" maxReceivedMessageSize="104857600"&gt;
       &lt;readerQuotas
          maxDepth="2147483647" maxStringContentLength="2147483647"
          maxArrayLength="2147483647" maxBytesPerRead="2147483647"
          maxNameTableCharCount="2147483647" /&gt;
       &lt;security mode="None"&gt;
       &lt;/security&gt;
      &lt;/binding&gt;
      &lt;binding name="SSLBinding"&gt;
       &lt;security mode="TransportWithMessageCredential"&gt;
        &lt;transport clientCredentialType="None"/&gt;
       &lt;/security&gt;
      &lt;/binding&gt;
     &lt;/basicHttpBinding&gt;
    &lt;/bindings&gt;
    &lt;services&gt;
     &lt;service behaviorConfiguration="DnsService.DNSSerivceBehavior" name="DnsService.DNSSerivce"&gt;
      &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="DefaultBinding"  contract="DnsService.IDNSService"&gt;
       &lt;identity&gt;
        &lt;dns value="localhost"/&gt;
       &lt;/identity&gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="SSLBinding"  contract="DnsService.IDNSService"&gt;
       &lt;identity&gt;
        &lt;dns value="localhost"/&gt;
       &lt;/identity&gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt;
      &lt;endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/&gt;
     &lt;/service&gt;
    &lt;/services&gt;
    &lt;behaviors&gt;
     &lt;serviceBehaviors&gt;
      &lt;behavior name="DnsService.DNSSerivceBehavior"&gt;
       &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt;
       &lt;serviceMetadata httpGetEnabled="true"/&gt;
       &lt;serviceMetadata httpsGetEnabled="true"/&gt;
       &lt;!-- 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 --&gt;
       &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
      &lt;/behavior&gt;
     &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;
   &lt;/system.serviceModel&gt;
  </code></pre>