title: there was no endpoint listening at https://wserver:442/service1.svc
body: <p>I am trying to setup a WCF Service with a self signed SSL. </p>
  
  <p>I can browse to the HTTPS and it shows the meta data and I can create a service refernce.</p>
  
  <p>however it throws the exception: There was no endpoint listening at <code>https://wserver:442/service1.svc</code>
  that could accept that message.</p>
  
  <p>wserver is the name of my server, but I do not use it anywhere so I dont know where it is getting it from?</p>
  
  <p>My Server Webhost.config (where i think the problem probably lies) is:</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;bindings&gt;
        &lt;wsHttpBinding&gt;
          &lt;binding name="Binding1"&gt;
            &lt;security mode="TransportWithMessageCredential"&gt;
              &lt;message clientCredentialType="UserName"/&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/wsHttpBinding&gt;
  
      &lt;/bindings&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="ServiceBehavior" name="AutoSenderWCFService.AutoSenderService"&gt;
          &lt;endpoint binding="wsHttpBinding" bindingConfiguration="Binding1"
            contract="AutoSenderWCFService.IService1" /&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="ServiceBehavior"&gt;
            &lt;serviceCredentials&gt;
  
              &lt;userNameAuthentication userNamePasswordValidationMode="Custom"
                customUserNamePasswordValidatorType="AutoSenderWCFService.MyValidator, AutoSenderWCFService"/&gt;
  
            &lt;/serviceCredentials&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;!-- 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="false"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
   &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;/system.webServer&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Or maybe I made a mistake with the self signed SSL?</p>
  
  <p>My Clientside is just:</p>
  
  <pre><code>    private void button1_Click(object sender, EventArgs e)
      {
  
          ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
          client.ClientCredentials.UserName.UserName = "test";
          client.ClientCredentials.UserName.Password = "testPassword";            
          ServiceReference1.Contact[] test = client.GetDrivers();
  
      }
  }
  </code></pre>