Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have the following Configure method on Startup:
public void Configure(IApplicationBuilder app)
app.Use(async (context, next) =>
If I put a breakpoint in the "await next.Invoke();" it never gets hit nor does the Invoke method on my GlobalizationMiddleware (the constructor does though). I've tried placing it before and after every UseUmbracoxxx callI without any progress. Is it something the umbraco is doing to bypass my middlewares? Is there a way arround it?
It looks like Umbraco registers itself to handle all requests, and when a middleware handles a request, it doesn't need to pass it on to the next middleware :). I would imagine you could register an endpoint of your own, or you could add your own controller. You also could register a middleware using an IStartupFilter, like in the example below, to get into the pipeline before Umbraco.
public void ConfigureServices(IServiceCollection services)
private class StartupFilter : IStartupFilter
public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next) => app =>
I was on a small holiday that's why I'm only answer today.
Using the startup filter like you said did work but it doesn't work for my use case because I need to access the session and at that time the Session Property returns an InvalidOperationException.
I'm thinking of using instead a base controller that overrides OnActionExecuting and doing the GlobalizationMiddleware operations there.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted