ASP.Net身份 - 多种认证方法 [英] ASP.Net Identity - Multiple Authentication Methods

查看:146
本文介绍了ASP.Net身份 - 多种认证方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在新的ASP.Net识别系统配置,支持多种认证方式?

Is it possible to configure the new ASP.Net Identity system to support multiple authentication methods?

我要支持Windows身份验证(联网)和应用程序级的用户(最好使用实体框架选项)的要求。这似乎是在老ASP.Net籍世界是几乎不可能的,但有什么新OWIN根据实施改变了吗?

I have a requirement to support both Windows authentication (Intranet) and application level users (ideally using the Entity Framework option). This seems to be almost impossible in the old ASP.Net Membership world but has anything changed with the new OWIN based implementation?

我需要在那里Windows验证先,然后尝试一个场景,如果失败,该网站将回退到应用层认证。

I need a scenario where Windows Auth is attempted first and then, if it fails, the site falls back to application level authentication.

作为第二个问题,你如何去有关添加实体框架表,以支持这在一个应用程序的现有数据库使用数据库第一?

As a secondary question, how do you go about adding the Entity Framework tables to support this to an existing database in an app that is using Database First?

推荐答案

我需要在那里Windows验证尝试,然后再一个场景,如果失败,该网站将回退到应用层认证。

添加项目为每种类型的认证。

Add a project for each type of authentication.

作为第二个问题,你如何去有关添加实体框架表,以支持这在一个应用程序的现有数据库使用数据库第一?

当您上传您的网站服务器的实体框架将处理这个要求。只要使用多个的DbContext。他们不必是同一个表的一部分,只要你正确地引用它们。

Entity Framework will handle this for you when you upload your site to the server. Just use multiple DbContext. They don't have to be part of the same table as long as you reference them correctly.

这篇关于ASP.Net身份 - 多种认证方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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