title: HTTPS for Mercurial 1.9.2 on windows server 2008/IIS 7 giving me Errno 10054
body: <p>We are a small company (its a Microsoft shop) we are currently using subversion with VisualSVN installed (pretty easy to setup btw)
  I am currently evaluating Mercurial because of branching nightmare in svn.</p>
  
  <p>So first i followed
  <a href="http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi" rel="nofollow">http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi</a> 
  with latest mercurial source code 1.9.2 and python 2.7 got the below error</p>
  
  <pre><code>Failed to import callback module 'hgwebdir_wsgi'
  The specified module could not be found.
  </code></pre>
  
  <p>so i <strong>scratched</strong> that and then i followed this
  <a href="http://www.jeremyskinner.co.uk/mercurial-on-iis7/" rel="nofollow">http://www.jeremyskinner.co.uk/mercurial-on-iis7/</a> and it worked until i reached the step
  <strong>Enabling SSL</strong> which is where the problem is. i even setup ssl certs using OpenSSL
  <a href="http://www.dylanbeattie.net/docs/openssl_iis_ssl_howto.html" rel="nofollow">http://www.dylanbeattie.net/docs/openssl_iis_ssl_howto.html</a>
  still nothing.
  this is the error i get</p>
  
  <pre><code>URLError: [Errno 10054] An existing connection was forcibly closed by the remote host
  [command returned code 255...]
  </code></pre>
  
  <p>Server side i have this
  hgweb.config</p>
  
  <pre><code>[collections]
  C:\repository\hg = C:/repository/hg
  
  [web]
  #push_ssl = false
  allow_push = *
  baseurl = /hg
  cacerts =
  </code></pre>
  
  <p>web.config</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;configuration&gt;
  &lt;system.webServer&gt;
      &lt;handlers&gt;
          &lt;add name="Python" path="*.cgi" verb="*" modules="CgiModule" scriptProcessor="C:\Python27\python.exe -u &amp;quot;%s&amp;quot;" resourceType="Unspecified" /&gt;
      &lt;/handlers&gt;
      &lt;rewrite&gt;
          &lt;rules&gt;
              &lt;rule name="rewrite to hgweb" patternSyntax="Wildcard"&gt;
                  &lt;match url="*" /&gt;
                  &lt;conditions&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Rewrite" url="hgweb.cgi/{R:1}" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
      &lt;/rewrite&gt;
      &lt;security&gt;
           &lt;requestFiltering&gt;
             &lt;requestLimits maxAllowedContentLength ="2147482624" /&gt;
          &lt;/requestFiltering&gt;
      &lt;/security&gt;
  &lt;/system.webServer&gt;
  &lt;system.web&gt;
      &lt;httpRuntime executionTimeout="540000" maxRequestLength="2097151"/&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p></p>
  
  <p>client side hgrc</p>
  
  <pre><code>[paths]
  default = https://webtest/hg/test/
  
  [hostfingerprints]
  webtest = 50:de:a4:d9:72:59:68:fd:91 ...
  </code></pre>
  
  <p><strong>EDIT</strong>
  I tried to install MacHg on my macbook to test. i used <a href="http://machghelp.jasonfharris.com/kb/connections/how-do-i-add-a-server-certificate-or-fingerprint-for-https" rel="nofollow">http://machghelp.jasonfharris.com/kb/connections/how-do-i-add-a-server-certificate-or-fingerprint-for-https</a> as walkthrough and it WORKS!! so this eliminates server(i.e.server can push &amp; pull from both http &amp; https) so now i am sure its my windows/TortoiseHg which has problem. (but following these steps for tortoiseHg gives me nothing :( )</p>
  
  <p><strong>EDIT2</strong>
  One more finding... i can't even clone using https, it only works for http. I tried to clone one of codeplex projects using https and that works!...This is really frustrating </p>
  
  <p>Am i missing something? any help will be appreciated.</p>