title: ASP.Net Core 2.0 mixed authentication of JWT and Windows Authentication doesn't accept credentials
body: <p>I've API created in asp.net core 2.0 where I am using mixed mode authentication. For some controllers JWT and for some using windows authentication.</p>
  
  <p>I've no problem with the controllers which authorize with JWT. But for the controllers where I want to use windows authentication I am indefinitely prompted with user name and password dialog of chrome.</p>
  
  <p>Here my sample controller code where I want to use Windows Authentication instead of JWT.</p>
  
  <pre><code>[Route("api/[controller]")]
  [Authorize(AuthenticationSchemes = "Windows")]
  public class TestController : Controller
  {
      [HttpPost("processUpload")]
      public async Task&lt;IActionResult&gt; ProcessUploadAsync(UploadFileModel uploadFileModel)
      {
  
      }
  }
  </code></pre>
  
  <p>My configure services code </p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
       services.AddAuthentication(options =&gt;
       {
          options.DefaultAuthenticateScheme = IISDefaults.AuthenticationScheme;
          options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
       })
       .AddJwtBearer("Bearer", options =&gt;
       {
          options.TokenValidationParameters = new TokenValidationParameters
          {
              ValidateAudience = false,       
              ValidateIssuer = false,  
              ValidateIssuerSigningKey = true,
              IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("blahblahKey")),
              ValidateLifetime = true, //validate the expiration and not before values in the token
              ClockSkew = TimeSpan.FromMinutes(5) //5 minute tolerance for the expiration date
          };
       });
  
       // let only my api users to be able to call 
       services.AddAuthorization(auth =&gt;
       {
          auth.AddPolicy("Bearer", new AuthorizationPolicyBuilder()
              .AddAuthenticationSchemes(JwtBearerDefaults.AuthenticationScheme‌​)
              .RequireClaim(ClaimTypes.Name, "MyApiUser").Build());
       });
  
       services.AddMvc();
  }
  </code></pre>
  
  <p>My configure method.</p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env)
  {
      app.UseCors("CorsPolicy");
  
      if (env.IsDevelopment())
      {
          app.UseDeveloperExceptionPage();
      }
  
      app.UseAuthentication(); //needs to be up in the pipeline, before MVC
      app.UseMvc();
  }
  </code></pre>
  
  <p>Appreciate your suggestions and help on this.</p>
  
  <p>Update: Till now I've been debugging my code on chrome. But when I have used IE 11, the above code is running without any issue. </p>
  
  <p>Can this be CORS issue of chrome where preflight issue?</p>
  
  <p>Thanks</p>