Book Image

Hands-On Full-Stack Web Development with ASP.NET Core

By : Tamir Dresher, Amir Zuker, Shay Friedman
Book Image

Hands-On Full-Stack Web Development with ASP.NET Core

By: Tamir Dresher, Amir Zuker, Shay Friedman

Overview of this book

Today, full-stack development is the name of the game. Developers who can build complete solutions, including both backend and frontend products, are in great demand in the industry, hence being able to do so a desirable skill. However, embarking on the path to becoming a modern full-stack developer can be overwhelmingly difficult, so the key purpose of this book is to simplify and ease the process. This comprehensive guide will take you through the journey of becoming a full-stack developer in the realm of the web and .NET. It begins by implementing data-oriented RESTful APIs, leveraging ASP.NET Core and Entity Framework. Afterward, it describes the web development field, including its history and future horizons. Then, you’ll build webbased Single-Page Applications (SPAs) by learning about numerous popular technologies, namely TypeScript, Angular, React, and Vue. After that, you’ll learn about additional related concerns involving deployment, hosting, and monitoring by leveraging the cloud; specifically, Azure. By the end of this book, you’ll be able to build, deploy, and monitor cloud-based, data-oriented, RESTful APIs, as well as modern web apps, using the most popular frameworks and technologies.
Table of Contents (22 chapters)
Title Page
PacktPub.com
Contributors
Preface
Index

Chapter 7. Troubleshooting and Debugging

No software product is perfect, and the harsh truth is that no matter how much effort you put into designing and testing your code, there is always a very good chance that you missed some edge case that will cause your application to fail. If you can't win the game, you need to change the rules. Instead, make sure that, even if your application fails with an error, it will know how to recover and give you as much information as it can so that you can reproduce the scenario and solve the problem.

In this chapter, you will learn how you can protect your API from unhandled exceptions, and how you can return meaningful error responses to your API client that will later allow you to decipher what the problem was. You will also learn how to add logging and diagnostics to your code, so that problem investigation will become easier.

In this chapter, we will cover the following topics:

  • Adding logging to your application
  • Enabling diagnostics with Application Insights...