Book Image

Learning ASP.NET Core 2.0

By : Jason De Oliveira, Michel Bruchet
Book Image

Learning ASP.NET Core 2.0

By: Jason De Oliveira, Michel Bruchet

Overview of this book

The ability to develop web applications that are highly efficient but also easy to maintain has become imperative to many businesses. ASP.NET Core 2.0 is an open source framework from Microsoft, which makes it easy to build cross-platform web applications that are modern and dynamic. This book will take you through all of the essential concepts in ASP.NET Core 2.0, so you can learn how to build powerful web applications. The book starts with a brief introduction to the ASP.NET Core framework and the improvements made in the latest release, ASP.NET Core 2.0. You will then build, test, and debug your first web application very quickly. Once you understand the basic structure of ASP.NET Core 2.0 web applications, you'll dive deeper into more complex concepts and scenarios. Moving on, we'll explain how to take advantage of widely used frameworks such as Model View Controller and Entity Framework Core 2 and you'll learn how to secure your applications. Finally, we'll show you how to deploy and monitor your applications using Azure, AWS, and Docker. After reading the book, you'll be able to develop efficient and robust web applications in ASP.NET Core 2.0 that have high levels of customer satisfaction and adoption.
Table of Contents (19 chapters)
Title Page
Credits
Foreword
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Adding error handling to your applications


When developing applications, the question is not if errors and bugs will occur, but when they will occur. Building applications is a very complex task and it is nearly impossible to think about all of the cases that might occur during runtime. And even if you think you have thought about everything, then the environment is not behaving as expected, for example, a service is not available or processing a request is taking much more time than expected.

You have two solutions to this problem, which need to be applied at the same time—unit tests and error handling. Unit tests will assure the correct behavior during development time from an application point of view, while error handling helps you to be prepared during runtime for environmental issues. We are going to look at how to add efficient error handling to your ASP.NET Core 2.0 applications in this section.

By default, if there is no error handling at all and if an exception occurs, your application...