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.
Loading...
Related Quiz
- The default configuration system in ASP.NET Core is no longer web.config but instead uses _________ files.
- The Fluent API provides more configuration options compared to data annotations and is configured in the _________ method of the DbContext.
- How does ASP.NET Core achieve cross-platform compatibility?
- In a situation where you're building a single-page application (SPA) with a default index.html, which middleware ensures that the file is served when a user accesses the root URL?
- SignalR in ASP.NET Core is used to establish which type of communication?