ediwang / edi.routedebugger Goto Github PK
View Code? Open in Web Editor NEWASP.NET Core Middleware to show current route info and all routes
License: MIT License
ASP.NET Core Middleware to show current route info and all routes
License: MIT License
I hit an issue this morning which I've tracked down to this route debugger package. I no longer actually need the route debugger so I'll be removing the package from my project this morning, just letting you know what happened.
In Startup.cs public void Configure
, I have an exception handler, followed further down by the route debugger.
app.UseExceptionHandler(a => a.Run(async context => {
await context.Response.WriteAsync("anything"); // <-- throws `Cannot access a closed stream`
});
...
if (env.IsDevelopment()) { app.UseRouteDebugger(); } // <-- Commenting out this line makes the problem go away
The way I invoked an exception to cause the exception handler to be called was simply by throwing a new Exception
on the first line of a controller action.
I'm not sure exactly why this happens and I'm afraid I don't have the time at to dig any further into it, but I'm pretty sure you must have something in UseRouteDebugger
that is latching on to the HttpContext's response object and finalizing it's stream in such a way as to prevent other middleware from manipulating it. I tried, clearing the response, finalizing and flushing it myself, nothing worked.
Causes Error "Failed to deserialize response message."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.