title: Asp.Net core MVC application Windows Authentication in IIS
body: <p>My Asp.Net Core mvc web application requires Windows Authentication. In developpement, on IIS Express, everything works fine thanks to this setting</p>
  
  <p><strong>launchSettings.json</strong></p>
  
  <pre><code> "iisSettings": {
      "windowsAuthentication": true,
      "anonymousAuthentication": false,
      "iisExpress": {
        "applicationUrl": "http://localhost:61545/",
        "sslPort": 0
      }
    }
  </code></pre>
  
  <p>When deploying to IIS, I get a blank page. The Request to my site get a 500 error code.</p>
  
  <p>I tried to add this configuration to Startup.cs, as explained <a href="https://docs.asp.net/en/latest/publishing/iis.html#application-configuration" rel="noreferrer">here</a> , without success. </p>
  
  <pre><code>    services.Configure&lt;IISOptions&gt;(options =&gt; {
          options.ForwardWindowsAuthentication = true;
      });
  </code></pre>
  
  <p>When I look into the authentication parameters directly in IIS, Windows Authentication is activated.</p>
  
  <p>I found some post talking about a package called <code>Microsoft.AspNetCore.Server.WebListener</code>, others about implementing a custom Middleware. I can't imagine this basic feature needs that much effort to work. Am I missing something ?</p>