Category "asp.net-core-middleware"

.NET CORE, how to get file location for an exception in a web app, in middleware?

I've seen this question: How can I get the line number and file name from an exception in net Core? And tried the code, but it always says line 0 and no file na

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 a basic prerequisite so that I can i

Modify middleware response

My requirement: write a middleware that filters all "bad words" out of a response that comes from another subsequent middleware (e.g. Mvc). The problem: strea

How to directly set response body to a file stream in ASP.NET Core middleware?

Sample code below to write a file stream to Response.Body in an ASP.NET Core middleware doesn't work (emits empty response): public Task Invoke(HttpContext con