1

I'm new to MVC and I am creating a MVC project. My goal is to just display a website that only I can edit/post/delete and others can acess and only view the page.

I have seen some solutions including:

[Authorize(Roles = "User, Administrator")]

I already have a DB and I used Entity Framework code first.

How to approach the problem from here? Thanks.

1 Answers1

2

Have you tried Identity Framework? If not, create a empty project, then install https://www.nuget.org/packages/Microsoft.AspNet.Identity.Samples this package will create an ASP.NET MVC application that support for authentication and authorization. You can research base on this project, hope this help for you.

Tan Sang
  • 1,897
  • 1
  • 16
  • 28