When securing ASP.NET Core applications, the ________ attribute can be applied to ensure certain actions or controllers are accessible only to authenticated users.
- [Authorize]
- [AllowAnonymous]
- [RequireHttps]
- [ValidateAntiForgeryToken]
The [Authorize] attribute in ASP.NET Core is used to secure actions or controllers by specifying that only authenticated users are allowed access. It is a fundamental part of ASP.NET Core's security infrastructure.
Loading...
Related Quiz
- How does the ASP.NET Core Identity system handle migrations in a distributed deployment scenario where multiple instances might attempt to apply migrations simultaneously?
- You are working on an ASP.NET Core application and need to model a scenario where each Order can have multiple OrderDetails, but each OrderDetail belongs to one Order. How would you model this relationship using Entity Framework Core?
- How can you use Razor forms to send data to an action method via an HTTP GET request instead of the default POST request?
- How can you make certain sections optional in a Razor Layout View?
- What purpose does the .NET Core CLI serve in ASP.NET Core development?