For an action method to be accessible only by non-authenticated users, you should use the _________ attribute.

  • [AllowAnonymous]
  • [Authorize]
  • [DenyAnonymous]
  • [NonAuthenticated]
To make an action method accessible only to non-authenticated (anonymous) users in ASP.NET Core, you should use the [AllowAnonymous] attribute. This attribute overrides any global authorization policies, allowing unrestricted access to the action by users who haven't been authenticated.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *