Now that Microsoft has removed support for the ASP.NET Web Application Management tool in Visual Studio 2013, what is the best way to manage users and roles in your ASP.NET applications?

I'm starting on a new web app, and instead of building my own system for authentication and role management, I planned on using ASP.NET. However, what is the easiest way to add roles and members without directly editing the database?

有帮助吗?

解决方案

I would suggest following the methodology used in the ASP.NET Identity Sample:

https://github.com/rustd/AspnetIdentitySample/tree/master/AspnetIdentitySample/Controllers

They use two Controllers: RolesAdminController and UserAdminController.

Using this scheme would allow for a seeded administrative account to then manage the roles and users of that site.

I suspect you could probably just copy those straight into a new project using the new Identity scheme with very few modifications to work properly. However, I haven't personally attempted doing that part myself.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top