Home » Microsoft » 70-486 v.2 » Which two locations you store the credentials?
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.
In which two locations you store the credentials? (Each correct answer presents a complete solution.
A. In Session
B. In a cookie
C. In ViewData
D. In TempData
Correct Answer: AB
Explanation/Reference:
Server sessions and cookies can both be configured to secure and they both persist after the users log on.
Incorrect Answers:
C: ViewData’s life only lasts during current http request.
D: TempData is a bucket where you can dump data that is only needed for the following request. That is, anything you put into TempData is discarded after the next request completes.