Let's assume that you created the ASP.NET Core application (MVC or web API), controllers, and action methods connected to the database to fetch records and then added authentication; everything runs smoothly.
Just for fun, comment on the code inside the Configure method of Startup class and run the application. Surprisingly, there won't be any build errors and a blank browser window shows up.
Navigating to any route, pages, or assets always returns a blank screen. Taking a deep dive into this, we can infer the following:
- The Configure method is one of the starting points when an HTTP request arrives
- When a request arrives, someone has to process the request and return a response
- An HTTP request has to undergo various operations, such as authentication, CORS, and so on, before they access the resource
The Configure method of the Startup class...