title: Forcing to use SSL: An error ocurred attempting to determine the process id of the DNX process hosting your application
body: <p>I want to enforce using https on my site. If found <a href="https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure-ssl-certificate/#4-enforce-https-on-your-app" rel="nofollow">this article</a> and I used the code that was there. Unfortunately, after adding this code to web.config, this error appears when I try to open my website on local IIS:</p>
  
  <blockquote>
    <p>An error ocurred attempting to determine the process id of the DNX process hosting your application</p>
  </blockquote>
  
  <p>My web.config looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
  
      &lt;rewrite&gt;
        &lt;rules&gt;
          &lt;rule name="Force HTTPS" enabled="true"&gt;
            &lt;match url="(.*)" ignoreCase="false" /&gt;
            &lt;conditions&gt;
              &lt;add input="{HTTPS}" pattern="off" /&gt;
            &lt;/conditions&gt;
            &lt;action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" /&gt;
          &lt;/rule&gt;
        &lt;/rules&gt;
      &lt;/rewrite&gt;
  
      &lt;handlers&gt;
        &lt;add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/&gt;
      &lt;/handlers&gt;
      &lt;httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Solutions from other stackoverflow questions like "Enable Anonymous Authentication" or deleting project.lock.json doesn't work.</p>
  
  <p>I'm using ASP.net Core RC1</p>