Hosting ASPNETCore sub-application under ASPNET .netframework website. I have a website hosted under IIS which is developed in ASP.NET MVC 4 targeting to .NET Framework 4.0 and i'm trying to add an application developed with ASPNET Core under this website. are we able to do that ? (I tried, and its work only if i host them separately in two websites)
1 Answers
There's not enough here to help you, specifically, but generally speaking, this is problematic because ASP.NET Core only uses Web.config to load the ASP.NET Core hosting IIS module, and an ASP.NET site is going to have all sorts of things in its Web.config, including many conflicting HTTP modules.
Web.config is inherited by default. While you can turn off individual sections with inheritInChildApplications="false". You must add this to every, single section in the parent's Web.config, and remember to do any time you add new sections in the future, or it will break you ASP.NET Core app. If you have to, then you have to, but the idea that a change to some other application will potentially break another without any indication that a problem has occurred is a scary prospect to say the least.
It would be far better to just host the ASP.NET Core on a subdomain or something, and let it be its own site.