为什么我们只需要序列化Viewstate.为什么没有其他任何状态管理技术? [英] Why do we need to serialize Viewstate only. Why not any other State Management Technique??

查看:73
本文介绍了为什么我们只需要序列化Viewstate.为什么没有其他任何状态管理技术?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我们只需要序列化Viewstate.为什么不使用任何其他状态管理技术?

Why do we need to serialize Viewstate only. Why not any other State Management Technique??

推荐答案

好吧,默认情况下,其他状态(ApplicationSessionCache)是受管理的,即在同一.NET进程中.如果要对这些状态使用"Out of process"实现,则显然需要对对象进行序列化/反序列化.

例如,如果您在状态服务器中管理Session ,则Asp.net运行时将需要对对象进行序列化/反序列化,以将对象存储到状态服务器/从状态服务器检索对象.另外,如果使用任何分布式缓存引擎,则需要对对象进行序列化/反序列化.
Well, by default the other states (Application, Session, Cache) are managed "In Process", that is, within the same .NET process. If you want to use a "Out of process" implementation for those states, you need to serialize/de-serialize objects obviously.

For example, if you manage the Session in a State server, the Asp.net runtime will need to serialize/de-serialize the objects for storing/retrieving objects to/from the state server. Also, if you use any distributed caching engine, objects are required to be serialized/de-serialized.


正如Subho所说,不仅需要序列化视图状态.您还还需要使用其他技术进行序列化,但是仅当您基于技术以outproc模式(即sqlserver,状态服务器或某些自定义)保存这些数据时才需要进行序列化.
As Subho said, Its not only the view state that you need to serialize. You also need to serialize in other techniques as well, but it is required only when you save these data in outproc mode ie sqlserver, state server or some custom, based on technique.


这篇关于为什么我们只需要序列化Viewstate.为什么没有其他任何状态管理技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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