ASP.Net MVC 5 has a bunch of new features. Below are a few exciting features we are going to discuss in this article,
- ASP.NET Identity
- Attribute Routing
- Filter Overrides
- One ASP.NET
- Bootstrap
ASP.NET Identity
In ASP.NET 2.0, a simple membership provider was introduced so that a user can store credentials in SQL Server Database, and whenever a user wants to use the Application, it should provide the credentials already registered in the DB. With changing times and technology, users have become more social these days so developers like to allow users to log in into Websites using social channels like Facebook, Twitter, etc.. which is possible using new ASP.NET Identity.
Advantages of ASP.NET Identity
- ASP.NET Identity System can be used across all ASP.NET frameworks( Webforms,mvc , webapi..).
- Social login provider can be integrated very easily into MVC 5 Application (facebook, twitter).
- Persistence control – By default, ASP.NET Identity stores all the users' information in a database, by using entity framework code, which is the first approach.
a. We have the control to change the Database Schema, fields in the tables etc.
Now time for some Action has come, lets code.
- Create a new project,



- Now press Ctrl + F5 to run the Application,

- Click Log in, as shown below:

- Setting up SSL in IIS Express
We should use a secure connection to connect to the social providers as our data (credentials) is very sensitive data, so we will use https instead of http. For this, we need to setup SSL in our project.
Brief on SSL- Secure Sockets Layer(SSL) is a standard security technology to establish an encrypted link between Webserver and a Browser.
- SSL ensures that all the data passed between a Webserver and a Browser is in encrypted format rather than simple text.
- To set up SSL, a Webserver needs a SSL certificate.
- Once SSL is implemented, Application starts using https rather than http.
- In the Solution Explorer, click ProjectName.
- Hit F4 to see the project properties and check whether the SSL enabled is false or true and if it is not enabled, then make it true.

- In the Solution Explorer, click ProjectName.
- Secure Sockets Layer(SSL) is a standard security technology to establish an encrypted link between Webserver and a Browser.
- After enabling the SSL to true, we will get SSL URL,

- Copy the SSL URL.
- In Solution Explorer, right click project(MVCAspIdentityApp) and click properties.
- Select Web tab and paste the URL in ProjectUrl Box.This URL will be used when we configure Facebook and Google Authentication Apps.

- Now, let's test whether the Application is SSL is enabled or not as before that, put [RequireHttps] attribute on the Home Controller.

Press Ctrl + F5
























Dinesh KumarPosted Nov 9, 2021, 4:17 AM
Nice Article
DhawalPosted Jun 25, 2018, 4:42 AM
Awesome. this one is really usefull
Avinash AdicherlaPosted Jun 20, 2016, 2:24 AM
Nice Article..
Santhakumar MunuswamyPosted Jun 9, 2016, 12:46 AM
Thank you for nice share
Mohammed AshrafPosted Jun 4, 2016, 4:08 AM
Nice
Mohammed AshrafPosted Jun 4, 2016, 4:08 AM
Nice
Praveen SreeramPosted Jun 3, 2016, 2:24 PM
Nice