Closed John0King closed 2 years ago
See https://github.com/aspnet/AspNetKatana/blob/main/src/Microsoft.Owin.Host.SystemWeb/PreApplicationStart.cs
Basically, the assembly has a PreApplicationStartMethod
attribute defined that causes the IIS dotnet hosting runtime to execute the Initialize function which then registers the OwinHttpModule
. I don't think the handler is registered as such - it is just setup as a route handler, same as MVC etc. based on the paths you map when you setup your owin app.
Thanks , I figured out the httpmodule
registeration , but there is also a OwinHttpHandler.cs
, and how it work or does it work at all ?
The handler is only used when manually registered. https://github.com/aspnet/AspNetKatana/blob/dbe159e43e2eee44f315f26268943e8ab5a4f60d/src/Microsoft.Owin.Host.SystemWeb/RouteCollectionExtensions.cs#L112-L117 https://github.com/aspnet/AspNetKatana/blob/dbe159e43e2eee44f315f26268943e8ab5a4f60d/src/Microsoft.Owin.Host.SystemWeb/OwinRouteHandler.cs#L62-L64
Thanks @Tratcher
Does that means the OwinRouteHandler
is not been used normally (now all owin stuff handled by the OwinHttpModule
)?
and Maybe it too late for the System.Web
stuff. but I think we should add a doc/wiki about how owin startup
,
currently the doc only have a very short word about the startup
, https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/owin-middleware-in-the-iis-integrated-pipeline#how-owin-middleware-executes-in-the-iis-integrated-pipeline
In the IIS integrated pipeline the request pipeline consists of HttpModules subscribed to a pre-defined set of the pipeline events such as BeginRequest, AuthenticateRequest, AuthorizeRequest, etc.
but not mention why there no httpmodule configuration in web.config
Since this is an old component, we don't actively update the concept docs. Feel free to use the edit option there to submit a PR.
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.
See our Issue Management Policies for more information.
when use Owin , there no configuration in web.config, but how it regiester the
OwinHttpModule
andOwinHttpHandler
?