title: any sample example for IISCreation with SSL using C#?
body: <p>was getting error while trying below for creating site.</p>
  
  <pre><code>X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
  store.Open(OpenFlags.ReadOnly);
  var certificate = store.Certificates.Find(X509FindType.FindBySubjectName, "localhost", true);
  X509Certificate x509Certificate = certificate[0];
  //iHashCode = x509Certificate.GetHashCode();
  store.Close();
  
  Site.Add(string name, string bindingInformation, string physicalPath, Encoding.ASCII.GetBytes(objCertificate[0].GetHashCode()), string certificateStore,objX509Certificate.GetName());
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>A specified logon session does not exist. It may already have been terminated</p>
  </blockquote>