DK ALT
DK ALT

Reputation: 2193

Storing user specific data in ASP.NET MVC

In my application each user has it's own menus depending on changing information on the database.

This way when a user logs-in I have to keep the parameters he can choose somewhere in a Station state table.

So when he choose the parameters I'll retrieve the correspondent option id and make a response from there.

I'm keeping this value in a Current Session object but I'm encountering several problems.

What's the best practice for doing this? I'm reading several articles that state the Session object is not a good idea in ASP.NET MVC.

Upvotes: 3

Views: 2283

Answers (2)

Nwachukwu A. Nnaemeka
Nwachukwu A. Nnaemeka

Reputation: 369

You can use Asp.Net Cookies, you can create, assign and destroy within the controller Follow this link Cookies in ASP.Net MVC 5 for more help ...

Upvotes: 1

AntSpiteri
AntSpiteri

Reputation: 312

Session objects can still be used within MVC check out the answer here Using Session objects in MVC, Is it really bad?

It points to 2 other questions that had a similar question.

What kind of problems are you having?

Upvotes: 1

Related Questions