且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Session实际上如何在MVC中运行?

更新时间:2023-01-18 08:03:53

1.In ASP.NET MVC application the Session is working in the same way like in classic ASP.NET web application, and as I know there is no difference between them!

2.For each user that are trying to access the web application by using a web browser ==> a new session will be created and cached for a period of time in that browser for the used computer, so this is the reason because if you are accessing the web application from the same computer by using the same browser two times the same session is used. But if you are trying to access the same web application from two different computers you will got two different Session objects and this do not depends on the used browser.

3.Like I said above the Session for a web client is cached for a timeout period (by using cookies for example), and the session depends on the used browser and computer. All this session timeout and caching parameters are configurable in the web.config.

4.See 1st point above. For details see in MSDN[^]


相关阅读

技术问答最新文章