Question
Is it possible to use a .NET Standard library containing ASP.NET Core middleware in an ASP.NET Framework (4.6.1) application that contains the usual ASP.NET Framework owin middleware. Thereby removing the need to install ASP.NET Core Hosting (Kestrel, etc) to the IIS Server.
I have already looked at this answer and links
Scenario
An existing ASP.NET Web API targeting .NET Framework 4.6.1 deployed to IIS. This was written pre ASP.NET Core and includes owin middleware. Something like:
public class Startup
{
public void Configuration(IAppBuilder app)// namespace Owin
{
app.UseMyAwesomeMiddleware();
}
}
There is an ASP.NET Core library that I would like to use that targets .NET Standard. That library contains ASP.NET Core middleware. So the example application startup class is something like:
public class Startup
{
public void Configure(IApplicationBuilder app) //Namespace Microsoft.AspNetCore.Builder
{
app.UseAwesomeLibMiddleware();
}
}
Motivation
If this was possible, then the theory is that it would be possible to include this library into the existing ASP.NET Web API app and deploy to IIS. The only other option seems to be to port the app and owin middleware to ASP.NET Core and install ASP.NET Core Hosting (Kestrel, etc) to the server where IIS is running.