.NET 8 Middleware Unexpectedly Changes Status Code to 204 After _next(context)
I am working on a .NET 8 Webapp. I have implemented a middleware to log requests and responses, but I’m facing an issue where the status code is unexpectedly changing from 200 to 204 after calling _next(context). Here is the code and a detailed description of my setup and the problem: