我如何在asp.net应用程序中设置双重身份验证 [英] How I set Dual authentication in asp.net application

查看:65
本文介绍了我如何在asp.net应用程序中设置双重身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有基于Windows身份验证的应用程序,我们必须使用他的域识别用户,如果他有效,他应该直接登录到应用程序,但如果身份验证失败,那么他应该被重定向到登录页面。



他必须输入id和密码才能访问应用程序,但当验证失败时,它会提示windows提示输入windows id和密码而不是重定向到登录页面

we have windows authentication based application where we have to identify user with his domain and if he is valid he directly should get logged in to the application but if authentication fails then he should get redirected to login page.

where he has to enter id and password to access the application but when authentication fails at that time it is giving windows prompt to enter windows id and password rather then redirecting to login page

推荐答案

您需要使用web.config中的Location标记来允许所有用户访问LoginPage.aspx。一个例子是在MSDN文档中:



http://msdn.microsoft.com/en-us/library/b6x6shw7(v = vs.85).aspx [ ^ ]



这样,当有人试图访问LoginPage.aspx(或任何你的名字).Net不会尝试对它们进行身份验证,但会允许所有人访问这一页。
You need to use the Location tag in web.config to allow all users access to LoginPage.aspx. An example is in the MSDN documentation:

http://msdn.microsoft.com/en-us/library/b6x6shw7(v=vs.85).aspx[^]

This way, when someone tries to get to LoginPage.aspx (or whatever yours is called) .Net will not try to authenticate them but will allow everyone access to just that one page.


这篇关于我如何在asp.net应用程序中设置双重身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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