Skip to content

Multiple 401 when using Windows authentication on HTTP.sys #13634

Closed
@peval27

Description

@peval27

Describe the bug

The 401 WWW-Negotiate challenge happens for each request.

To Reproduce

Steps to reproduce the behavior:

  1. Using this version of ASP.NET Core '2.2'
  2. Set up HTTP.Sys with options.Authentication.Schemes = Microsoft.AspNetCore.Server.HttpSys.AuthenticationSchemes.Negotiate;
  3. Run Fiddler to intercept requests
  4. Use a client to perform a GET

Expected behavior

The 401 WWW-Negotiate challenge happens only the first time.

Additional context

It looks like when using IIS it is possible to configure authPersistNonNTLM=true to achieve this. See [https://blogs.msdn.microsoft.com/dsnotes/2014/02/11/iis-how-to-reduce-multiple-authentication-or-multiple-401-while-using-kerberos-for-authentication/](this link)

Side note

Performing the 401 challenge means more requests, more traffic, less performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-very-fewThis issue impacts very few customersarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-httpsyshelp candidateIndicates that the issues may be a good fit for community to help with. Requires work from eng. teamseverity-minorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions