what is diff. b/w app state & session state
2015-05-21 17:28
309 查看
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
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
相关文章推荐
- 【iOS开发】-canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- What is RowID/ROW_ID,&…
- Scope 'session' is not active for the current thread
- what is "LPCTSTR"?
- iOS 报错 CodeSign error: code signing is required for product type 'App Extension' in SDK 'iOS 8.1'
- UVa 10056 What is the Probability ? (概率&有一个陷阱)
- A easy example to tell you what is "2>&1" in Perl
- Error: An App ID with identifier "*****" is not avaliable. Please enter a different string.
- iOS App Programming Guide => State Preserve/Restore & Resources
- What is Viewstate? Can any object be stored in a Viewstate? (整理)
- Q:Is there any way to define what the "Open Resource" dialog in Eclipse should show?
- Execution failed for task ':app:compileDebugAidl': aidl is missing
- What $this->_forward is doing
- Xcode上传App到Appstore,报错Error ITMS-90049:"This bundle is invalid.The bundle...."
- The transaction log for database 'xx' is full,Error: 9002, Severity: 17, State: 2
- python中的单元测试pyUnit & what is unit test and why
- What is "dll"?
- What things is chaos can't change?
- Exception in thread "main" org.hibernate.SessionException: Session is closed!
- The function "state.highstate" is running as PID 4417的解决方法