Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having IApplicationBuilder in .NET Framework

I apologize if this isn't architecturally possible, but I'm just trying to integrate certain .NET Core features into my existing old Webforms application, as I would someday like to move to .NET Core, but I don't want to continue writing outdated code.

Anyways, when using Microsoft.Owin.Host.SystemWeb my application requires a Startup Class. However it expects a method: Configuration(IAppBuilder app), but the features I am looking for (e.g. app.UseMvc()) require app to be of IApplicationBuilder.

Could one to hackishly convert a IAppBuilder to IApplicationBuilder? I'd imagine if such a thing were possible, it would require bringing in a few other classes.

Or even better, is there a Package similair to SystemWeb that looks for a Startup class but instead expects Configure(Iapplicationbuilder app, ...).

It seems somewhat outlandish, but it would be nice to be able to do, and if anyone knows how to do such a thing, it would be here.

like image 417
aijony Avatar asked May 08 '26 19:05

aijony


1 Answers

ASP.NET Core and ASP.NET are fundamentally incompatible. You cannot mix and match ASP.NET Core and something like Web Forms. Period. There's is no partial upgrade support. Moving an existing ASP.NET app to ASP.NET Core is all or nothing.

like image 54
Chris Pratt Avatar answered May 11 '26 09:05

Chris Pratt