Top "Asp.net-core-middleware" questions

Questions about Asp.

How to read ASP.NET Core Response.Body?

I've been struggling to get the Response.Body property from an ASP.NET Core action and the only solution I've …

c# asp.net-core asp.net-core-mvc asp.net-core-middleware
ASP.NET Core JWT Bearer Token Custom Validation

After a lot of reading, I have found a way to implement a custom JWT bearer token validator as below. …

c# asp.net asp.net-core jwt asp.net-core-middleware
asp.net core defaultProxy

In net 4.5 we are working with proxy like this: <system.net> <!-- --> <defaultProxy enabled="…

c# asp.net asp.net-core asp.net-core-mvc asp.net-core-middleware
What exactly is 'UseAuthentication()' for?

I have a question regarding authentication in ASP.NET Core 2: what exactly is the call app.UseAuthentication() for? Is it …

c# authentication asp.net-core-2.0 asp.net-core-middleware
ASP.NET Core Localization with help of SharedResources

Hi I have a question about the SharedResources file. It is glanced over in the tutorial here: https://docs.microsoft.…

asp.net asp.net-core asp.net-core-middleware asp.net-core-localization
How to do DI in asp.net core middleware?

I am trying to inject dependency into my middleware constructor as follows public class CreateCompanyMiddleware { private readonly RequestDelegate _next; private …

c# asp.net-core asp.net-core-2.0 asp.net-core-middleware
ASP.Net Core 2.0 How to get all request headers in middleware?

In ASP.Net Core 2.0, I am trying to validate the incoming request headers in a custom middleware. The problem is …

c# asp.net-core asp.net-core-2.0 asp.net-core-middleware request-pipeline
Modify middleware response

My requirement: write a middleware that filters all "bad words" out of a response that comes from another subsequent middleware (…

asp.net-core .net-core asp.net-core-middleware
ASP.NET Core modify/substitute request body

I want to do a substitution on HttpContext.Request.Body. I've tried to do it inside a middleware: public async …

c# asp.net-core .net-core asp.net-core-middleware