Owin阶段标记 [英] Owin Stage Markers

查看:185
本文介绍了Owin阶段标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序启动鉴于这种......

Given this in my app startup ...

app.Use((context, next) =>
{
   return next.Invoke();
}).UseStageMarker(PipelineStage.PostAuthenticate);


app.Use((context, next) =>
{
   return next.Invoke();
}).UseStageMarker(PipelineStage.Authenticate);



...为何PostAuthenticate代码身份验证代码之前执行?

... why does the PostAuthenticate code execute before the Authenticate code?

我不是说我的意思是:为什么第一app.use得到所谓第二app.use之前:为什么第一次调用获得前给予第二次叫了第二应?先前在请求管道发生

I don't mean "why does the first app.use get called before the second app.use" I mean: Why does the first invoke get called before the second given that that the second should be happening earlier in the request pipeline?

修改

与此相关的问题: 我如何获得Windows标识在此代码<? / A>

Related to this problem: How am I getting a windows identity in this code?

推荐答案

看来,即使违背IIS中的文档事件都连接起来,在顺序处理配置而不是在他们应该出现在请求生命周期的顺序。

It seems that even contrary to the documentation events in IIS are hooked up and processed in the order they are configured rather than in the order they should appear in the request lifecycle.

这感觉就像在owin请求生命周期对我的错误,但嘿,我有我的问题解决了。

This feels like a bug in the owin request lifecycle to me but hey, I got my problem solved.

这篇关于Owin阶段标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆