You are developing an ASP.NET MVC application that uses forms authentication.
Authentication credentials must be encrypted and secure.
You need to ensure that user credentials are persisted after users log on.
Where should you store the credentials? (Each correct answer presents a complete solution.
Choose all that apply.)
A.
In TempData
B.
In Session
C.
In ViewData
D.
In a cookie
I think it should be B and D. ViewData lifetime is too short (per request).
Correct answer is: B, D
I’d say B and D too
TempData and ViewData are too short-lived.
Session is secure and cookies can be encrypted and secured over HTTPS