Sunday, 2 May 2021

Asp.Net Core : How to check route metadata, endpoint details?

 

To Check route metadata, you can use the following code and debug it.

app.Use(async (context, next) =>
{
 var endPoint = context.GetEndpoint();
 var routes = context.Request.RouteValues;
});

How to create and use middleware in asp.net core

Middleware is piece of code that's assembled into an app pipeline to handle requests and responses.  Each middleware component in the re...