Using Windows Authentication in ASP.NET Core 3.1 Razor Pages

Imran Jalali 101 Reputation points
2022-12-18T11:10:55.347+00:00

I have requiment to use Windows Authentication with one of our readymade app which is currently using Cookie Authentication

     services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)  
                   .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, config =>  
                   {  
                       config.Cookie.Name = "TanfeethUserLoginCookie";  
                       config.LoginPath = "/Account/Login";  
                       config.LogoutPath = "/Account/Logout";  
                       config.AccessDeniedPath = "/Account/Access Denied";  
                   });  

I am willing to change it to Windows Authentication? is there any sample code available so, that I can follow?

Developer technologies ASP.NET ASP.NET Core
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 30,126 Reputation points
    2022-12-18T15:50:28.5+00:00

    See the official documentation.

    Configure Windows Authentication in ASP.NET Core

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.