Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何自定义ASP.Net标识_C#_Asp.net_Asp.net Mvc_Asp.net Mvc 5_Asp.net Identity - Fatal编程技术网

C# 如何自定义ASP.Net标识

C# 如何自定义ASP.Net标识,c#,asp.net,asp.net-mvc,asp.net-mvc-5,asp.net-identity,C#,Asp.net,Asp.net Mvc,Asp.net Mvc 5,Asp.net Identity,在读了很多关于ASP.Net身份的书之后,我仍然对新添加到ASP.Net身份验证系统中的一些东西感到困惑 如果我已经设计了一个带有用户管理表的数据库,我应该如何使用ASP.Net标识?例如,我想将AspNetUsers表映射到我自己的名为UserAccounts的表 我应该如何将这个新系统与现有的ASP.NETMVC应用程序混合使用 如果我不想先使用代码(Identity先使用代码),该怎么办 任何建议都会有帮助。 提前感谢。您必须使用实体框架迁移,这里有一些很好的链接可以帮助您: 通过

在读了很多关于ASP.Net身份的书之后,我仍然对新添加到ASP.Net身份验证系统中的一些东西感到困惑

  • 如果我已经设计了一个带有用户管理表的数据库,我应该如何使用ASP.Net标识?例如,我想将
    AspNetUsers
    表映射到我自己的名为
    UserAccounts
    的表
  • 我应该如何将这个新系统与现有的ASP.NETMVC应用程序混合使用
  • 如果我不想先使用代码(Identity先使用代码),该怎么办
任何建议都会有帮助。
提前感谢。

您必须使用实体框架迁移,这里有一些很好的链接可以帮助您:

通过此链接,您可以从MVC4迁移到MVC5

最后,如果您不想使用EF,我不认为您可以使用identity,asp.net identity需要以下nuget软件包:

Nuget软件包

Microsoft.Aspnet.Identity.Core
    This package contains the core interfaces of ASP.NET Identity.
    core

Microsoft.Aspnet.Identity.EntityFramework
    This package contains the implementation of ASP.NET Identity system which works with Entity Framework. This means that if you use this package then you can store information in a Sql Server database.

不完全是你问题的答案。但您可能想查看此项目:

(项目模板)在Visual Studio Gallery上

它可以用作使用数据库优先开发方法创建自定义ASP.NET身份提供程序的基础。它当前只有Db架构项目模板。但是很快就会有一个自定义的DbFirst身份提供者项目模板,以及它的单元测试