Step 1 - Have a running .Net Core app (with React as front end) in IIS on Windows Server.
Step 2 - Setup a MVC app within the Core app using 'Add Application' option in IIS. (Nested apps)
Note: AppPools of the 2 apps are different and point to appropriate Core/framework versions.
Result - When try to access the MVC app, get "HTTP Error 502.5 - Process Failure" error. From the logs in Event viewer, it appears the MVC app is trying to start the dll of the Core app and not MVC (message below).
Application 'MACHINE/WEBROOT/APPHOST/COREAPP/MVCAPP' with physical root 'PATH TO MVC APP' failed to start process with commandline 'dotnet .*COREAPP*.dll', ErrorCode = '0x80004005' : 80008091.
Believe the MVC app should somehow be forced to run in framework pointing to appropriate dll/startup file. Could someone point me in the right direction? Any thoughts would be appreciated!
Have below setting in MVC app's mvcapp.runtimeconfig.json file
{
"runtimeOptions": {
"framework": {
"name": ".net framework",
"version": "4.8"
},
"configProperties": {
"System.GC.Server": true
}
}
}
Got it working by forcing the parent app to NOT inherit it's config on to child app. Set the inheditChildApplication setting to false in parent config. In this case, I do not want any settings to be inherited to child, have to be cautious when wanting certain settings to be inherited.
<location path="." inheritInChildApplications="false">
<system.webServer>
Settings goes here
</system.webServer>
</location>
User contributions licensed under CC BY-SA 3.0