Developing ASP.NET MVC Web Applications — Question 37
You are designing am ASP.NET Core MVC application.
The application must store secure information that is specific to an individual user. The data must be automatically purged when the user logs off.
You need to save transient information in a secure data store.
Which data store should you use?
Answer options
- A. Session state
- B. Database storage
- C. Profile properties
- D. Application state
Correct answer: A
Explanation
The correct answer is A, Session state, as it is designed for storing user-specific information that is temporary and can be cleared when the user logs off. Database storage (B) is persistent and would not meet the requirement for automatic purging. Profile properties (C) are typically used for storing long-term user settings, and Application state (D) is shared across all users, making it unsuitable for individual user data management.