ASP.NET MVC2 应用程序中的第二层身份验证
我们有一个 ASP.NET 应用程序,部分采用 MVC(其余部分是基于 Web 表单的传统 CMS)。该应用程序通过表单身份验证进行身份验证,但从一组特定 IP 地址访问该应用程序的任何用户都会自动分配给“特殊”用户。
目前,我们有一个子应用程序,我们希望将其作为一个区域引入(父)MVC 应用程序。此应用程序使用 Windows 身份验证作为第二层身份验证。是否有一种简单的方法来保留第二层身份验证(可能通过第二授权属性)?请记住,用户可以从内部和外部登录此应用程序。在用于特殊表单身份验证用户的 IP 地址集之外,这排除了直接表单身份验证。如果这可以提供更简单的解决方案,那么我们也不必将第二层的 Windows 身份验证绑定在一起。
We have an ASP.NET application that's partly in MVC (the rest of it being a legacy webforms-based CMS). The application is authenticated via Forms Authentication, although any user accessing it from a specific set of IP addresses are automatically assigned to a "special" user.
We currently have a child application that we would ideally like to bring into the (parent) MVC application as an area. This application uses Windows Authentication as a 2nd layer of authentication. Is there an easy way of retaining the second layer of authentication (possibly by a 2nd authorize attribute)? This is bearing in mind the users can log into this application from both within & outside of the set of IP addresses used for the special forms authentication user, which rules out straight forms authentication. We're also not necessarily tied to windows authentication for this second layer if this makes for an easier solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有完全尝试过,但从我所看到的和我所看到的来看,到目前为止,我对自己的问题的解决方案是:
RedirectResult
而不是RedirectToRouteResult
,因为登录页面仍然在 WebForms 中而不是 MVC 中。不过,我仍然对其他解决方案持开放态度!
I'm yet to try it out fully, but from what I've seen & tried out thus far, my solution to my own problem is to:
RedirectResult
instead ofRedirectToRouteResult
as the login page is still in WebForms instead of MVC.I am still open to other solutions though!