ASP点网安全 [英] asp dot net security

查看:67
本文介绍了ASP点网安全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在c#点网中设计了一个小项目.项目中有很多页面.在Login.aspx页面中,有一个LOGIN按钮.成功登录后,重定向到TaskIndex.aspx页. TaskIndex.aspx页包含退出"按钮.我希望注销后重定向到Login.aspx页面.到目前为止,还不错,但是当我单击浏览器上的BACK bytton"或浏览器上的前进"按钮时,它将自动重定向到上一页和下一页.这是我的问题.我要保护它.怎么可能呢?请帮我?等待.............?寻求答案.

请再次帮助我.

I have design a small project in c# dot net. There are many pages in the project.In a Login.aspx Page there is a LOGIN button. After successful login, redirected to TaskIndex.aspx Page. The TaskIndex.aspx page contains SIGNOUT button. I want that, after sign out , redirected to Login.aspx page. Upto this is alright, but when i click on BACK bytton On Browser or FORWARD button on the Browser, it will redirected automatically to previous as well as next page . this is my problem. I want to protect it. How it is possible? Please Help Me? waiting.............? for answer.

please Help me again.

推荐答案

您是否尝试过 ^ ]-如果您使用了正确的身份验证过程,则应该可以使用.
Have you tried FormsAuthentication.SignOut[^] - if you have used proper authentication procedures, it should work.


^ ]


(如果您通过Session.Abandon()退出;那么您可以在
的页面加载中尝试使用此代码 TaskIndex.aspx页面.
if you sign out by Session.Abandon(); then you can try this code on page load of
TaskIndex.aspx page.
protected void Page_Load(object sender, EventArgs e)
    {
       if(Session["userid"]==null)
 
{
   Responce.Redirect("Login.aspx");
}
        
    }


这篇关于ASP点网安全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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