登录会话中的问题 [英] Problem in login session

查看:58
本文介绍了登录会话中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
这是manikumar,我创建了一个Web应用程序,名称为Address book.此目的是用户保持其电话联系号码.用户必须先注册,然后才能登录页面.我会按照以下步骤说明我的问题
->我创建了5个网页
他们是登录页面
注册页面
UserHome页面
userContacts页面
UserProfile页面

--->我将起始页面设置为UserContacts页面
第一次用户请求页面时,它直接转到登录页面.在那他可以输入他的用户名和密码.
--->假设用户已通过身份验证,然后他关闭页面但未注销.然后他再次请求相同的页面,然后直接使用上次登录人员的姓名转到UserContacts页面.
--->使用注销用户可以转到登录页面.
为什么会这样.每当用户关闭页面并再次请求页面时,我都希望登录页面.

我这样做的原因是我在学习带有示例的asp.net,并且可以通过所有可能的技术.多数民众赞成在那件事.如果有人不明白我的问题,请叫我我会清楚地阐述.
如果有人知道答案,请给我发送.


问候,
manikanta

Hello,
This is manikumar, i created a web application Name is Address book. This purpose is users maintain their telephone contacts number. The user must be registered before he login to the page. I explain my problem in the below steps
-->I created 5 web pages
they are signin page
signup page
UserHome page
userContacts Page
UserProfile Page

---> I set the starting page as UserContacts Page
First time the user request for the page it directly go to the login page. there he can type his username and password.
---> Suppose the user is authenticted then he close the page without signout. then again he request the same page then directly go to the UserContacts page with the last login person name.
---> With signout the user go to the sign in page.
why it is happening. When ever the user closes the page and again request the page i want the sign in page.

why i am doing like this is i am learning the asp.net with examples and i can go through the all possible techninques. thats the thing. If any one dont understand my problem please rly me i will elobarate clearly.
If any one know the answer plese send me that.


Regards,
manikanta

推荐答案

它直接进入页面而不是登录页面,因为会话当然仍然有效.用户关闭浏览器的行为不会导致会话被放弃,因为该行为发生在客户端而不是服务器上.默认会话超时为20分钟,如果您等待此时间并且仍然可以直接转到页面,则可能会遇到更大的问题.

当用户关闭浏览器或离开您的站点时要放弃会话,将需要一些javascript和ajax来处理事件并在服务器上调用方法以清除会话.
It is going directly to the page rather than the login page because the session is still valid of course. Just the act of the user closing the browser doesn''t cause the session to be abondoned since the the action has taken place on the client and not on the server. The default session time out is 20 minutes, if you wait for this and can still go directly to the page then you have some bigger issues.

To abandon the session when the user closes the browser or navigates away from your site will take some javascript and ajax to handle the event and call a method on the server to clear the session.


这篇关于登录会话中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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