TempData存储在哪里? [英] Where does TempData get stored?

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

问题描述

TempData存储在ASP.NET MVC框架(更具体地讲是ASP.NET MVC 2)中的什么位置?它存储在服务器端,还是发送给客户端?

Where does TempData get stored in the ASP.NET MVC Framework (more specifically, ASP.NET MVC 2)? Is it stored at server-side, or is sent to the client?

推荐答案

默认情况下,TempData使用ASP.NET会话作为存储.因此它存储在服务器上(默认为InProc).但是您可以定义其他ASP.NET会话状态模式:StateServer和SqlServer.如果不想使用ASP.NET会话,也可以编写一个自定义的TempData提供程序并自己处理存储.

By default TempData uses the ASP.NET Session as storage. So it is stored on the server (InProc is the default). But you could define other ASP.NET Session state modes: StateServer and SqlServer. You could also write a custom TempData provider and handle the storage yourself if you don't want to use the ASP.NET Session.

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

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