Skip to content

Instantly share code, notes, and snippets.

@oliverhanappi
oliverhanappi / AspNetCoreOwinMiddleware.cs
Last active December 31, 2020 11:18
Running ASP.NET Core within IIS
public class AspNetCoreOwinMiddleware<TAspNetCoreStartup> : OwinMiddleware, IServer
where TAspNetCoreStartup : class
{
private readonly IWebHost _webHost;
private Func<IOwinContext, Task> _appFunc;
IFeatureCollection IServer.Features { get; } = new FeatureCollection();
public AspNetCoreOwinMiddleware(OwinMiddleware next, IAppBuilder app)
: base(next)