title: Creating HTTPS secure soap web service in asp.net that requires certificate to be invoked
body: <p>I am trying to create a soap web service that will have one web method which takes name as input and will return "hello "+name over HTTPS and will require some certificate to be added in order to be invoked.</p>
  
  <p>I have created a self signed certificate in IIS and have added HTTPS binding with certificate. I have added my application under default web site and have enabled SSL on it.</p>
  
  <p>In the visual studio, I have created WCF service application, enabled SSL on it. Added asmx file that contains only one method in class. Here is the code.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Services;
  
  namespace POCSoap
  {
      [WebService(Namespace = "https://tempuri.org/")]
      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
      [System.ComponentModel.ToolboxItem(false)]
      public class WebService1 : System.Web.Services.WebService
      {
  
          [WebMethod]
          public string HelloWorld(string name)
          {
              return "Hello "+name;
          }
      }
  }
  </code></pre>
  
  <p>I have added binding and service declaration to web.config as well.</p>
  
  <pre><code>&lt;services&gt;
            &lt;service name="POCSoap.Service1"&gt;
                &lt;endpoint address=""
                          binding="basicHttpBinding"
                          bindingConfiguration="secureHttpBinding"
                          contract="POCSoap.IService1"/&gt;
  
                &lt;endpoint address="mex"
                          binding="mexHttpsBinding"
                          contract="IMetadataExchange" /&gt;
            &lt;/service&gt;
        &lt;/services&gt;
        &lt;bindings&gt;
            &lt;basicHttpBinding&gt;
                &lt;binding name="secureHttpBinding"&gt;
                    &lt;security mode="Transport"&gt;
                        &lt;transport clientCredentialType="None"/&gt;
                    &lt;/security&gt;
                &lt;/binding&gt;
            &lt;/basicHttpBinding&gt;
        &lt;/bindings&gt;
  </code></pre>
  
  <p>Still, Call through http is working and call through https is not working. What is missing here.</p>