Is it a good practice to avoid using Session State in ASP.NET MVC? If yes, why and how?

后端 未结 8 2342
情歌与酒
情歌与酒 2020-11-27 13:38

It\'s not explicitly written somewhere but I felt so after reading few blogs on ASP.NET MVC. Just got curious and thought of asking it here.

UPDATE:

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 14:42

    Session management was always challenging from ASP.net Web Forms to ASP.net MVC. However, MVC encourages to treate it as Stateless as you have benefit of REST based Web API. Most of the things that we used to store in Session previously accomplished by using both MVC + Web API combination.

提交回复
热议问题