vb.net Web空闲会话超时 [英] vb.net web idle session timeout

查看:91
本文介绍了vb.net Web空闲会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,先生/女士,

我正在使用vb.net做一个Web项目.我试图在30分钟计时器后5分钟后创建用户空闲超时,以便用户继续在当前页面中工作.我不知道如何开始以及从哪里开始.无论是在登录页面还是在每个页面中,我都在哪里创建它.请在vb.net中提供一些示例代码来执行用户空闲超时.

非常感谢您的帮助.

问候:Pam

hello sir/madam,

Im doing a web project using vb.net. Im trying to create user idle timeout after 5 minutes with 30 seconds timer for user to continue working in the current page. I don''t know how to start and where to start. Where do I create it whether in the login page or in every page. Please give some sample code in vb.net to do the user idle timeout.

Your help is much more appreciated.

Regards : Pam

推荐答案

您需要在登录页面中对用户进行身份验证.如果用户成功登录,则创建一个会话,并在每个页面中检查该会话的值以验证用户的真实性.如果未通过身份验证,则重定向到登录页面.
您可以在web.config文件中将会话超时设置为5分钟.这意味着,如果用户不请求您的任何网页,则他/她的会话将超时并过期.并且他/她需要再次登录才能访问页面.

这只是有关如何进行的基本想法.借助搜索引擎(Google,Bing)的帮助,找到相关的教程并阅读.

我可以给您几个搜索关键字-``asp.net登录控件'',``会话超时web.config''

pamineshk写道:具有30秒的计时器,以便用户继续在当前页面上工作.
我没有得到这部分. :confused:
You need to authenticate the user in your log-in page. If the user successfully logs in create a session and in every page check the value of the session to verify the user''s authenticity. Redirect to log-in page if not authenticated.
You can set a session timeout of 5 minutes in your web.config file. This means, if a user does not request any of your web page, his/her session will timeout and expire. And he/she needs to log-in again to access the pages.

This is just the basic idea on how you will go about it. Take help of search engines (Google, Bing), find relevant tutorials and read them.

I can give you few search keywords - ''asp.net login control'', ''session timeout web.config''

pamineshk wrote: with 30 seconds timer for user to continue working in the current page.
I didn''t get this part. :confused:


这篇关于vb.net Web空闲会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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