O'Reilly logo

Mastering AngularJS for .NET Developers by Mohammad Wadood Majid, Golrokh Mirzaei

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Securing the ASP.NET Web API

In Chapter 5, Creating Applications Using AngularJS, Entity Framework, and ASP.NET Web API, we created the ASP.NET Web API. However, anybody can access our web API if they know the URL. In this section, we will secure our web API. In order to use the ASP.NET Web API, the user must have permission to access the requested data. To implement security in the ASP.NET Web API, we created a table in the Northwind database.

You need to follow these steps to create a table:

  1. In Server Explorer, expand Data Connections, right-click on NorthwindEntities, and select New Query:
    Securing the ASP.NET Web API
  2. Paste this SQL and click on the Execute icon, as shown in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required