Click here to Skip to main content
15,881,684 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
is it a good idea to work with session state in mvc application and if it has some issues in mvc pattern and preformance
Posted

1 solution

Yes, it is a good idea, as this one is lower level as form state or application state was in web forms. It is well bound with IIS (and the web standards also), and you have several possibilities to tailor it[^] to your needs. And by the way you have nothing else in the hand to make your application "statefull". Thus it has nothing to do with the MVC patterns or ASP.NET MVC itself. If you consult the pipeline, you can see that both web forms, web pages and mvc relies on asp.net framework. Session handling is managed at that level.
Just an advice: keep in mind, that session state is not available at the time of the construction of a controller. If you need something like this, you will have to use IoC or override Initialize[^] method.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 9-Dec-14 11:07am    
Yes, 5ed.
—SA
Zoltán Zörgő 9-Dec-14 12:56pm    
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900