MVC - Store Protected Information

I just came up with this question during my MVC research. Is it possible that b is the correct answer?

You are developing a distributed application. The application must store protected information that is specific to the user. The data should be automatically cleared when the user logs off. You need to store temporary information in a secure data store. Which data store should you use?

and. Session state

B. Database storage

C. Profile Properties

E. Application state

Thank,

+3


source to share


3 answers


If "Data should be automatically cleared when user logs out" then there is literally no need for B or C. D (application state) is singularly between users, so your best bet is A.

From MSDN

... Application state is a useful place to store small amounts of frequently accessed data that does not change from one user to another. For information about persisting data for each user, see ASP.NET Session State Overview and ASP.NET Profile Profile Overview . [Ref]



This means A and C are possibilities, however -

[Profile Properties] is similar to session state, except that profile data is not lost when a user expires. [Ref]

which does not satisfy, "the data should be automatically cleared when the user logs out", leaving A as the appropriate response.

+6


source


My thoughts on the matter: session in asp.net can be configured to store information in db and by default it stores information in proc which is not suitable for distributed application. So the session parameter by itself is not appropriate. But the db option can be used with a session: this will satisfy the condition of clearing information after logging out on one side and store the information in secure storage (db) from the other.



Upd. If I could choose multiple options (each was part of the solution), I would choose the session server + state or the database. But since I can only choose one answer, I would prefer a session.

0


source


It is possible that B is a valid answer, but A is the better option.

-1


source







All Articles