在ASP.NET MVC中混合使用Windows和表单身份验证 [英] Mixing Windows and Forms Authentication in ASP.NET MVC

查看:250
本文介绍了在ASP.NET MVC中混合使用Windows和表单身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试建立一个同时使用Windows身份验证和表单身份验证的网站.我正在使用ASP.NET MVC,并且需要同时支持IIS6和7.我该如何让已知的AD用户进入应用程序(他们的AD ID与他们在应用程序数据库中的用户记录相对应的存储),并将其他所有人定向到标准的用户名/密码页面.

I'm currently trying to set up a website that uses both windows authentication and forms authentication. I am using ASP.NET MVC and both IIS6 and 7 need to be supported. How would I go about letting known AD users into the app (their AD id is stored against their user record in the application database) and directing everyone else to a standard username/password page.

推荐答案

似乎答案是否定的.我们必须设置2个站点,一个是具有表单身份验证的主应用程序,另一个是经过Windows身份验证的站点,该站点使用令牌将重定向到表单站点,令牌迅速过期,告诉令牌站点已通过身份验证的用户即将来临.

It seems the answer is no. We've had to set up 2 sites, the main application with forms authentication and a separate windows authenticated site which redirects to the forms site with a token which expires quickly telling the forms site that an authenticated user is incomming.

这篇关于在ASP.NET MVC中混合使用Windows和表单身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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