what is diff. b/w app state & session state

  Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than storing and retrieving information in a database. Unlike session state, which is specific to a single user session, application state applies to all users and sessions. Therefore, application state is a useful place to store small amounts of often-used data that does not change from one user to another.

  ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless protocol. This means that a Web server treats each HTTP request for a page as an independent request. The server retains no knowledge of variable values that were used during previous requests. ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a way to persist variable values for the duration of that session.By default, ASP.NET session state is enabled for all ASP.NET applications.

Alternatives to session state include the following:

  • Application state, which stores variables that can be accessed by all users of an ASP.NET application.
  • Profile properties, which persists user values in a data store without expiring them.
  • ASP.NET caching, which stores values in memory that is available to all ASP.NET applications.
  • View state, which persists values in a page.
  • Cookies.
  • The query string and fields on an HTML form that are available from an HTTP request.

Please check the below link for more information:

http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx

Regards,

Jai

Monday, October 20, 2008 5:58 AM

时间: 2024-08-17 06:32:22

what is diff. b/w app state & session state的相关文章

MVC之Session State性能

ASP.NET MVC之Session State性能问题(七) 前言 这一节翻译一篇有关Session State性能问题的文章,非一字一句翻译. 话题 不知道我们在真实环境中是否用到了Session State特性,它主要用来当在同一浏览器发出多个请求时来存储数据,在现在我们更多的为了避免整个页面刷新,Web应用程序更多倾向于利用高扩展性的Ajax,但是不知道我们是否注意到当我们使用Session数据多次请求MVC上的Action方法时产生的性能问题呢? 将Session放入上下文中(Put

ASP.NET MVC之Session State性能问题(七)

前言 这一节翻译一篇有关Session State性能问题的文章,非一字一句翻译. 话题 不知道我们在真实环境中是否用到了Session State特性,它主要用来当在同一浏览器发出多个请求时来存储数据,在现在我们更多的为了避免整个页面刷新,Web应用程序更多倾向于利用高扩展性的Ajax,但是不知道我们是否注意到当我们使用Session数据多次请求MVC上的Action方法时产生的性能问题呢? 将Session放入上下文中(Put Session into the Context) 在进行代码演

ASP.NET Session State(会话状态)SQLServer模式和设置

Thursday, December 5, 2013 ASP.NET保存session state(会话状态)有三种模式:In-Process, State Server, SQL Server.SQL Server模式的优点:    即使web application重启,状态数据也会被保存    多个web服务器可以共享状态数据    节省内存设置:    在web.config中,使用mode="SQLServer",例如:    <configuration>   

Unable to make the session state request to the session state server处理

Server Error in '/' Application. Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, p

Unable to make the session state request to the session state server处理方法

Server Error in '/' Application. Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, p

转: 解决【Unable to make the session state request to the session state server】

错误描述: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, please ensure that it accept

[SOME_MUTATION] (state) {// mutate state}Vuex中使用 ES2015 风格的计算属性命名功能来使用一个常量作为函数名

使用常量替代 Mutation 事件类型 使用常量替代 mutation 事件类型在各种 Flux 实现中是很常见的模式.这样可以使 linter 之类的工具发挥作用,同时把这些常量放在单独的文件中可以让你的代码合作者对整个 app 包含的 mutation 一目了然: 理解: ES6 允许字面量定义对象时,用方法二(表达式)作为对象的属性名,即把表达式放在方括号内. 这是es6的写法,转换为es5时这样的 var SOME_MUTATION = 'SOME_MUTATION' var muta

使用ASP.NET State Server实现多应用程序间共享Session State

原以为ASP.NET State Server原生支持多程序间共享SESSION,以为在同一服务器上 & 同一根域名下部署的多个应用程序间设置了相同了<sessionState/>和<machineKey/>事情就成了! 事实证明是自己TOO YOUNG TOO SIMPLE.根本不WORK! BING了一大轮,再找了一下度娘,看到以下较有参考价值的文章: http://forums.asp.net/t/1759392.aspx?Share+sessions+between

[转]Session and application state in ASP.NET Core

本文转自:https://docs.microsoft.com/en-us/aspnet/core/fundamentals/app-state By Rick Anderson and Steve Smith+ HTTP is a stateless protocol; the Web server treats each HTTP request as an independent request. The server retains no knowledge of variable va