NTLM Auth. returns 401 Unauthorized response #704

Closed
opened 2025-08-09 17:17:21 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @jmzagorski on 5/30/2017

I am using this version 1.1.1 with NTLM authorization in my startup below so I can utilize dotnet run in a development environment. However, all my client requests to the server result in a 401 when I have the [Authorize] attribute on a controller. How do I tell webpack to forward my credentials? All the research I have done was directing me to add the properties to the devServer property in my webpack.config.

  public class Program
  {
    public static void Main(string[] args)
    {
      var host = new WebHostBuilder()
// support dotnet run with windows auth in debug mode
#if DEBUG
        .UseWebListener(opts =>
        {
          opts.ListenerSettings.Authentication.Schemes = Microsoft.Net.Http.Server.AuthenticationSchemes.NTLM;
        })
#else
          .UseKestrel()
#endif
          .UseContentRoot(Directory.GetCurrentDirectory())
          .UseIISIntegration()
          .UseStartup<Startup>()
          .Build();

      host.Run();
    }
  }
}
*Originally created by @jmzagorski on 5/30/2017* I am using this **version 1.1.1** with NTLM authorization in my startup below so I can utilize `dotnet run` in a development environment. However, all my client requests to the server result in a 401 when I have the `[Authorize]` attribute on a controller. How do I tell webpack to forward my credentials? All the research I have done was directing me to add the properties to the `devServer` property in my `webpack.config`. ``` public class Program { public static void Main(string[] args) { var host = new WebHostBuilder() // support dotnet run with windows auth in debug mode #if DEBUG .UseWebListener(opts => { opts.ListenerSettings.Authentication.Schemes = Microsoft.Net.Http.Server.AuthenticationSchemes.NTLM; }) #else .UseKestrel() #endif .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup<Startup>() .Build(); host.Run(); } } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#704
No description provided.