+++ US vs. China: Das könnten die Gewinner aus dem Handelskonflikt werden! Jetzt zum Webinar am 21.10. anmelden! +++ -w-
News + Analysen
News + Adhoc
zugeh. Wertpapiere
Strukturierte Produkte
16.09.2019 12:00:00

How to handle errors in ASP.Net Web API

Microsoft’s ASP.Net Web API is a lightweight framework you can use to build stateless RESTful services that run on HTTP. Exceptions are errors that occur at runtime, and exception handling is the technique of handling runtime errors in your application code.Every ASP.Net Web API developer should know how to handle exceptions in Web API and how to send out appropriate error codes and error messages from Web API controller methods. We will examine how to perform these tasks in the sections below. [ Microsoft .Net 5 unites the .Net Framework and .Net Core: Find out what the merger of .Net Standard and .Net Core means for developers. | Learn how to get the most from .Net Framework and .Net Core from InfoWorld’s Microsoft Architect blog. | Keep up with hot topics in programming with InfoWorld’s App Dev Report newsletter. ]Using HttpResponseException in ASP.Net Web APIYou can use the HttpResponseException class to return specific HTTP status codes and messages from your controller methods in Web API. Here is an example.To read this article in full, please click here
Weiter zum vollständigen Artikel bei "The Standard HK"