asp.net mvc修改默认身份验证系统 [英] asp.net mvc modify default authentication system

查看:127
本文介绍了asp.net mvc修改默认身份验证系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2013,正在创建一个新的asp.net Web应用程序,并选择带有身份验证:个人用户帐户"的模板MVC. 我查看了为身份验证系统生成的代码,但我不明白AspNetUsers的字段是在哪里创建的...我想设置此表(用户)与数据库中其他表的关系(创建者:我).我正在使用EF.

I am using Visual Studio 2013 and I am creating a new asp.net web application and I am selecting the template MVC with "Authentication: Individual Users Accounts". I had a look at the code generated for the authentication system and I don't understand where the fields for the AspNetUsers are created... I want to set relationships from this table(of users) to other tables in the database(created by me). I am using EF.

您知道一种使用EF修改表AspNewUsers的方法吗?

Do you know a way to modify the table AspNewUsers with EF?

谢谢.

推荐答案

默认情况下它位于App_Data文件夹中(如果看不见,请在解决方案资源管理器中按显示所有文件.)

It's in App_Data folder by default (Press Show all files in Solution explorer if it's not visible).

您还可以更改EF db上下文的连接字符串.默认情况下,它位于 Web.config 文件中.在 connectionStrings 标记中找到 DefaultConnection .

You can also change connection string of EF db context. By default, it's in Web.config file. Find DefaultConnection in connectionStrings tag.

这篇关于asp.net mvc修改默认身份验证系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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