What's the difference among app.use
, app.run
, app.map
in Owin? When to use what? It's not straightforward when reading the documentation.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
app.use
inserts a middleware into the pipeline which requires you to call the next middleware by calling next.Invoke().
app.run
inserts a middleware without a next, so it just runs.
With app.map
you can map paths, which get evaluated at runtime, per request, to run certain middleware only if the request path matches the pattern you mapped.
See docs for use
and run
and map
for more details