相关疑难解决方法(0)

FormsAuthentication.SignOut()不会将用户注销

对此我砸了太久了.如何防止用户在使用FormsAuthentication.SignOut注销后浏览网站的页面?我希望这样做:

FormsAuthentication.SignOut();
Session.Abandon();
FormsAuthentication.RedirectToLoginPage();
Run Code Online (Sandbox Code Playgroud)

但事实并非如此.如果我直接输入URL,我仍然可以浏览到该页面.我有一段时间没有使用自己的安全性,所以我忘记了为什么这不起作用.

asp.net forms-authentication

139
推荐指数
8
解决办法
13万
查看次数

使aspx身份验证cookie无效

我有一个asp.net网络表单。用户进行身份验证时,它将创建一个名为.aspxauth的安全cookie。

uppon注销,我称之为这两种方法

FormsAuthentication.SignOut(); 
Session.Abandon()
Run Code Online (Sandbox Code Playgroud)

问题是我们进行了渗透测试,如果我窃取了cookie,注销并手动重新插入cookie,我将再次被登录。因此,.aspauth不会使服务器端无效。

我已经用谷歌搜索了,但是找不到该安全漏洞的答案。

c# asp.net security

6
推荐指数
1
解决办法
1545
查看次数

标签 统计

asp.net ×2

c# ×1

forms-authentication ×1

security ×1