O'Reilly logo

Building Microservices with ASP.NET Core by Kevin Hoffman

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

Chapter 7. Building an ASP.NET Core Web Application

It is generally accepted that microservices are standalone applications that often expose RESTful APIs over HTTP(S). We’ve also seen microservices that are message-driven in nature and don’t expose RESTful APIs, but rather operate by receiving and publishing messages.

Another type of microservice is a web application. This might seem like an odd assertion to those of you who have spent some time maintaining bloated, legacy web app monoliths. However, I believe that, when built properly, a web application is nothing more than a microservice that has an explicit contract to expose HTML over some subset of its endpoints.

In this chapter we’ll take a look at how ASP.NET Core allows us to build web applications, but we’ll examine this functionality with an eye toward how we can build high-performance, scalable, highly available web applications designed to thrive in the cloud rather than simply using a new technology to build an upgraded version of a legacy monolith.

All of the code for this chapter can be found in the GitHub repository.

ASP.NET Core Basics

In this section  of the chapter we’re going to take a tour of the basics of building web applications with ASP.NET Core. This will look very familiar to people who have built applications based on the Open Web Interface for .NET (OWIN) in the past and may look very alien to readers coming from a purely Web Forms–based development background.

A lot of what you’ll see in this section ...

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