In an e-commerce application, you have a controller that manages orders, and it is protected using the [Authorize] attribute. However, you wish to allow a public tracking feature where users can see the status of their order without logging in. How would you implement this?
- Create a separate controller or action without the [Authorize] attribute for public order tracking.
- Use client-side authentication to allow access to order tracking.
- Use a cookie-based authentication mechanism for order tracking.
- Allow anonymous access to the entire order controller.
To implement a public order tracking feature, you should create a separate controller or action without the [Authorize] attribute. This allows unauthenticated users to access order tracking while keeping the rest of the order management secure with authentication.
Loading...
Related Quiz
- While learning about ASP.NET Core, you're advised to install an IDE that offers robust debugging, profiling, and integrated testing. Which IDE fits this description?
- Your web application needs to provide different access levels, such as "Admin," "User," and "Guest." Which ASP.NET Core Identity feature would be crucial for implementing this?
- Imagine you're developing an ASP.NET Core application on a machine without any internet access. Which tool, among the following, allows you to install NuGet packages from a local feed or folder?
- To define an optional section in a Razor layout, you would use the _______ method.
- Which tool among the following is primarily a command-line tool for .NET operations?