Skip to Content
Professional C# 5.0 and .NET 4.5.1
book

Professional C# 5.0 and .NET 4.5.1

by Christian Nagel, Jay Glynn, Morgan Skinner
February 2014
Intermediate to advanced
1560 pages
50h 21m
English
Wrox
Content preview from Professional C# 5.0 and .NET 4.5.1

Chapter 44ASP.NET Web API

WHAT’S IN THIS CHAPTER?

  • Overview of the ASP.NET Web API
  • Creating Services
  • .NET Clients
  • Web API Routing
  • Using OData
  • Security
  • Custom Hosting

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/go/procsharp on the Download Code tab. The code for this chapter is divided into the following major examples:

  • Book Service Sample
  • Formula 1 Data Service Sample
  • Secure Web API
  • Self-Host App

OVERVIEW

When Windows Communication Foundation (WCF) was announced, it was the technology for communication and replaced several other technologies in the .NET stack (a few mentioned are .NET Remoting and ASP.NET Web Services). The goal was to just have one communication technology that is very flexible and fulfills all needs. However, WCF was initially based on SOAP. Now we have many scenarios where the powerful SOAP enhancements are not needed. For simpler scenarios such as HTTP requests returning JSON, WCF is too complex. That’s why another technology was introduced in the year 2012: ASP.NET Web API. With the release of Visual Studio 2013, the next major version of ASP.NET Web API is released: 2.0. This version is covered in this chapter.

ASP.NET Web API offers a simple communication technology based on Representational State Transfer (REST). REST is an architecture style based on some constraints. Let’s compare a service that is based on the REST architectural style with a service that makes use of SOAP to see ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro C# 2010 and the .NET 4 Platform, Fifth Edition

Pro C# 2010 and the .NET 4 Platform, Fifth Edition

Andrew Troelsen
ASP.NET 2.0 Illustrated

ASP.NET 2.0 Illustrated

Alex Homer, Dave Sussman
Professional Visual Studio® 2008

Professional Visual Studio® 2008

Nick Randolph, David Gardner

Publisher Resources

ISBN: 9781118832981Purchase book