Apress Access

ASP.NET Web API 2: Building a REST Service from Start to Finish

2nd Edition

By Jamie Kurtz , Brian Wortman

  • eBook Price: $20.99
Buy eBook Buy Print Book

Learn how to leverage the features and capabilities of the ASP.NET Web API to build a RESTful web service from start to finish. This book will first explain the REST architectural style, and then build on that knowledge, the ASP.NET Web API, and some helpful patterns, tricks, and techniques, to go from a blank slate to a fully functional, secure REST service.

Full Description

  • Add to Wishlist
  • ISBN13: 978-1-484201-10-7
  • 280 Pages
  • User Level: Beginner to Advanced
  • Publication Date: August 3, 2014
  • Available eBook Formats: EPUB, MOBI, PDF

Related Titles

  • Windows 10 for the Internet of Things
  • DevOps on the Microsoft Stack
  • Practical Microsoft Visual Studio 2015
  • Develop Microsoft HoloLens Apps Now
  • ASP.NET MVC with Entity Framework and CSS
  • HTML5 Quick Markup Reference
Full Description

The ASP.NET MVC Framework has always been a good platform on which to implement REST-based services, but the introduction of the ASP.NET Web API Framework raised the bar to a whole new level.

Now in release version 2.1, the Web API Framework has evolved into a powerful and refreshingly usable platform. This concise book provides technical background and guidance that will enable you to best use the ASP.NET Web API 2 Framework to build world-class REST services.

New content in this edition includes:

  • New capabilities in Web API 2 (currently version 2.1).
  • Support for partial updates, or PATCH.
  • API versioning.
  • Support for legacy SOAP-based operations.
  • How to handle non-resource APIs using REST
  • How to best expose relationships between resources
  • JSON Web Tokens, CORS, CSRF

Get ready for authors Jamie Kurtz and Brian Wortman to take you from zero to REST service hero in no time at all. No prior experience with ASP.NET Web API is required; all Web API-related concepts are introduced from basic principles and developed to the point where you can use them in a production system. A good working knowledge of C# and the .NET Framework are the only prerequisites to best benefit from this book.

What you’ll learn

  • Introduction to the REST architecture
  • How to design a REST API
  • New capabilities in ASP.NET Web API 2
  • Understanding ASP.NET Web API controller activation
  • Automatic lifetime management for database connections and transactions
  • Using NHibernate with ASP.NET Web API
  • Easily secure a REST service, using standards-based authentication and authorization and JSON Web Tokens
  • Supporting legacy SOAP callers with ASP.NET Web API
  • How to expose relationships between resources
  • Supporting partial resource updates under REST
  • Web API versioning

Who this book is for

Intermediate level developers in .NET, REST, C#

Table of Contents

Table of Contents

1. ASP.NET as a Service Framework

2. What is RESTful?

3. Designing Our Sample REST API

4. Building the Environment and Creating the Source Tree

5. Controllers, Dependencies, and Managing the Database Unit of Work

6. Securing the Service

7. Dealing with Relationships, Partial Updates, and Other Complexities

8. Leveraging new Web API Features to Simplify Your Code and Support Legacy Systems

9. Putting It All Together

Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.


If you think that you've found an error in this book, please let us know by emailing to editorial@apress.com . You will find any confirmed erratum below, so you can check if your concern has already been addressed.
No errata are currently published


    1. Expert ASP.NET Web API 2 for MVC Developers


      View Book

    2. Pro ASP.NET MVC 5 Platform


      View Book

    3. ASP.NET Web API 2 Recipes


      View Book

    4. ASP.NET Web API 2: Building a REST Service from Start to Finish


      View Book