我们如何使用Windows身份验证在MVC应用程序中实现注销? [英] How can we implement Sign Out in MVC application using windows authentication ?

查看:71
本文介绍了我们如何使用Windows身份验证在MVC应用程序中实现注销?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



我们有一些内部应用程序,在mvc尝试实现注销功能但工作不正常,暂时关闭浏览器但是window.close不适用于chrome和Mozilla,请帮忙。





亲切的问候。



Ajit Kumar Das

解决方案

Mozilla明确表示您无法关闭一个没有用脚本打开的脚本的窗口 [ ^ ]。



Chrome是版本依赖,但一些黑客可以关闭窗口。不过,这是一个20%的选择,所以选择一种适用于所有浏览器的方法。



你更好的选择IMO是清除cookie和重定向到另一个地方;如果你有一个内部登陆页面,这是一个不错的选择。



有一个很好的例子,说明如何快速轻松地吹饼干在此。 [ ^ ]。

Dear All,

We have some internal app , in mvc trying to implement Sign Out functionality but not working properly, for time being we are closing the browser but window.close is not working for chrome and Mozilla , please help.


Kind Regards .

Ajit Kumar Das

解决方案

Mozilla explicitly that you cannot close a window with script that wasn't opened with script[^].

Chrome is version dependent, but some hacks can close the window. It's a 20% option, though, so rather than do that pick a method that will work for all browsers.

Your better option IMO is to clear the cookie and redirect to another site; if you have an internal landing page that's a good choice.

There's a solid example of how to quickly and easily blow your cookies up here.[^].


这篇关于我们如何使用Windows身份验证在MVC应用程序中实现注销?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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