ASP.Net中的注销问题c# [英] Logout problems in ASP.Net c#

查看:78
本文介绍了ASP.Net中的注销问题c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我在ASP.Net的退出页面遇到一些问题。



please给我建议: -



1)会议结束



2)按下后退按钮后注销它应该重定向到登录

Hello,

I have some problems in logout page in ASP.Net.

please give me the suggestions for:-

1) Session end

2) When pressing back button after logout it should be redirect to login


page。

推荐答案

如何在c#.net 中注销会话[ ^ ]


您可以使用 Session.Clear()结束会话。



回按钮问题,看看这篇非常好的文章:

退出后浏览器后退按钮问题 [ ^ ]

退出后退出按钮问题 [ ^ ]



-KR
You can end the session using Session.Clear().

For the back button issue ,look at this really good articles:
Browser Back Button Issue After Logout[^]
Browser back button issue after logout[^]

-KR


会话与身份验证无关,因此您应该对站点进行编码,使其能够在会话超时后继续运行。至于后退问题,我只是忽略它。他们所做的只是看到他们已经看到过的东西。要阻止这种情况发生,您需要禁用缓存,否则会对网站性能产生负面影响。
Sessions are not related to authentication, so you should code your site such that it can survive session timeouts. As for the "back" issue, I'd just ignore it. All they're doing is seeing things they've already seen. To stop this happening would require you to disable caching which will have a negative effect on site performance for no benefit.


这篇关于ASP.Net中的注销问题c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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