如何在不使用asp.net的会话的情况下将通用列表的数据集从一页传递到另一页 [英] How to pass a dataset ot generic list one page to another without using session in asp.net

查看:64
本文介绍了如何在不使用asp.net的会话的情况下将通用列表的数据集从一页传递到另一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不使用asp.net c#中的会话的情况下将数据集或通用列表从一个页面传递到另一页面.
因为会话无法在我的主持人中正常运行.会话在每个短时间内自动超时.因此更改了将我的登录详细信息存储到cookie中,而不是现在将其完美运行.

How to pass a dataset or generic list one page to another without using session in asp.net c#.
because session is not working perfectly in my host. Session automatically timeouting in every short period. So changed storing my login details into cookies instead of session its working perfectly now.
is there any way to pass mydatas into another pages pls help.

推荐答案

可以使用序列化或缓存概念将数据集从一页传递到另一页. br/> 最好的方法是使用Cache对象.
A dataset can be passed from one page to another, either by using Serialization or Cache concept.
The best way is to use the Cache object .


我会回过头来在会话中存储登录详细信息-将它们存储在cookie中并不安全.

然后,您必须找出会话超时的原因.默认情况下,超时设置为20分钟,但可以在网络中进行配置. config [ ^ ].

另一个可能性是IIS由于不活动而关闭了工作进程或正在对其进行回收,就像它定期进行的那样.您可以使用会话状态服务器 [
I would go back to storing login details in the session - storing them in cookies is not secure.

Then you have to find out why your Sessions are timing out. The timeout is set to 20 mins by default, but is configurable in web.config[^].

Another possibility is that IIS is shutting down the worker process due to inactivity or recycling it, as it does periodically. You can use a Session State Server[^]in this case.


这篇关于如何在不使用asp.net的会话的情况下将通用列表的数据集从一页传递到另一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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