【问题标题】:Force logout on web application在 Web 应用程序上强制注销
【发布时间】:2015-09-27 14:43:58
【问题描述】:

我目前在 Web 应用程序上有一个注销按钮,该按钮会放弃会话,然后将用户重定向到登录页面。唯一的问题是在完成注销之前按钮正在等待的其他进程正在运行。

有什么方法可以强制注销而不考虑其他进程?

【问题讨论】:

  • 这些其他进程是什么?这些不能以某种方式发出信号以优雅地中止/完成吗?

标签: html asp.net logout


【解决方案1】:

System.Web.HttpContext.Current.Response.Clear()

Session.Clear();

FormsAuthentication.SignOut();

Response.Cache.SetNoStore();

【讨论】:

    猜你喜欢
    • 2013-06-24
    • 2019-04-04
    • 2019-04-21
    • 2020-09-06
    • 1970-01-01
    • 1970-01-01
    • 2021-08-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多