会话变量都保存在哪里? [英] Where are the session variables saved?

查看:163
本文介绍了会话变量都保存在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正好在哪里会话变量保存?饼干?服务器内存?

Where exactly are session variables saved? Cookies? Server memory?

同样在哪里Application变量保存?

Again where are Application variables saved?

推荐答案

投入会话变量被存储在哪里配置的 SessionStateProvider 被配置来存储它们。

Variables put into Session are stored wherever the configured SessionStateProvider is configured to store them.

默认 SessionStateProvider 使用什么称正在处理(是InProc )会议和这个存储位置在服务器内存中,ASP.NET工作进程的内存空间内。

The default SessionStateProvideruses what's referred to as In Process (InProc) Session and the storage location for this is in server memory, inside the memory space of the ASP.NET worker process.

您可以配置自己的 SessionStateProvider 来存储会话变量在其他地方,如进程外,在数据库中。

You can configure your own SessionStateProvider to store Session variables elsewhere, such as out of process, in a database.

Application变量存储在 ApplicationState 这也是存储在ASP.NET辅助进程的内存空间。不同于会话状态,应用程序状态适用于所有用户和会话。据我所知,没有配置存储ApplicationState其他地方;如果你需要存储大量数据的应用程序,那么你可能想看看 ASP.NET缓存

Application variables are stored in ApplicationState which is also stored in the memory space of the ASP.NET worker process. Unlike Session State, Application State applies to all users and sessions. As far as I am aware, There is no configuration to store ApplicationState elsewhere; if you need to store lots of application data then you may want to look at ASP.NET Caching.

这篇关于会话变量都保存在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆