title: ASP.NET Core web app URL is case-sensitive when authenticating users
body: <p>I have a test ASP.NET Core 2.0 web application that authenticates the user using SAML. All is well if the URL typed in the browser matches the case of the web app name in IIS 10 (ex. .../MyTestSite). However, if the user types a different case (ex. .../mytestsite) they will fail to authenticate.</p>
  
  <p>In code, the point of failure is in the <code>OnGetCallbackAsync</code> method of the <code>ExternalLogin</code> class at this line:</p>
  
  <pre class="lang-cs prettyprint-override"><code>var info = await _signInManager.GetExternalLoginInfoAsync();
  </code></pre>
  
  <p>Since <code>info == null</code> in these cases the user is redirected back to the login page.</p>
  
  <p>I have noticed that the <code>.AspNetCore.Antiforgery</code> token has the path value from the url (/mytestsite) but <code>Identity.External</code> path value is the site name (/MyTestSite). </p>
  
  <p>I'm not sure why this happens or why case would even matter.</p>