Skip to main content

Posts

Showing posts from February, 2017

ASP.NET MVC 5 Security And Creating User Role

A few members asked me to write an article on ASP.NET MVC security and so I planned to create a series of articles. In this series we will see: A SP.NET MVC 5 Security and Creating User Role User Role base Menu Management (Dynamic menu using MVC and AngularJS) In this article we will see how to use ASP.NET Identity in MVC Application for creating user roles and displaying the menu depending on user roles. Here we will see how to: Create default admin role and other roles . Create default admin users . Add Username for new User Registration . Select User Role during User Registration . Change Login Email with User Name . Display Role Creation Menu only for Admin User . Display message for normal user . Redirect Unauthenticated users to default home page .   Authentication and Authorization Authentication Check for the Valid User. Here the question is how to check whether a user is valid or not. When a user comes to a website for the first time he will register