使用ASP.NET Idenity创建默认用户帐户 [英] Create a default user account using ASP.NET Idenity

查看:59
本文介绍了使用ASP.NET Idenity创建默认用户帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.NET MVC 5和Identity API开发一个简单的应用程序.我想问一问在创建表和启动应用程序后如何在超级管理员角色中创建超级管理员帐户.我正在使用默认的ASP.NET MVC 5和Visual Studio 2013的个人帐户"模板,我不确定该怎么做.

I am developing a simple application using ASP.NET MVC 5 and the Identity API. I would like to ask how I am able to create a Super Administrator account inside a Super Administrators role upon creation of the tables and startup of the application. I am using the default ASP.NET MVC 5 with Individual Accounts template of Visual Studio 2013 and I am not sure how to do what I aim.

推荐答案

没关系,我发现这个有用的链接可以准确显示我想要的内容:

Never mind, I found this useful link that shows exactly what I want:

https://github.com/rustd/AspnetIdentitySample/blob/master/AspnetIdentitySample/App_Start/IdentityConfig.cs

这篇关于使用ASP.NET Idenity创建默认用户帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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