This IS a duplicate from “Running MVC Web app targeting .net 4.6.1 in a virtual directory under a ASP.NET core web app. Is it possible?” but it is not resolved and OP said he solved it by creating an additional app. So I post it again.
I have an Azure Web App organized as follows:
"site/wwwroot/MyWeb.dll" (ASP.NET Core 2.0) "site/admin/MyAdmin.dll" (ASP.NET 4.5)
The web works ok. But when I try to access the admin site I get the following error
HTTP Error 502.5 – Process Failure
The following is an extract from “…/logFiles/eventlog.xml” which I thought was useful
<Event>
<System>
<Provider Name="IIS AspNetCore Module"/>
<EventID>1000</EventID>
<Level>1</Level>
<Task>0</Task>
<Keywords>Keywords</Keywords>
<TimeCreated SystemTime="2018-01-04T20:09:05Z"/>
<EventRecordID>1024919046</EventRecordID>
<Channel>Application</Channel>
<Computer>RD00155D77CB9A</Computer>
<Security/>
</System>
<EventData>
<Data>Application 'MACHINE/WEBROOT/APPHOST/MYAPP/ADMIN' with physical root 'D:homesiteadmin' failed to start process with commandline 'dotnet .MyWeb.dll', ErrorCode = '0x80004005 : 80008081.</Data>
</EventData>
</Event>
Feel free to ask for any kind of info you may need.
Thanks in advance!
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Application ‘MACHINE/WEBROOT/APPHOST/MYAPP/ADMIN’ with physical root ‘D:homesiteadmin’ failed to start process with commandline ‘dotnet .MyWeb.dll’, ErrorCode = ‘0x80004005 : 80008081.
It seems that your virtual application targets on ASP.NET 4.5 is served by the AspNetCoreModule module. You could modify the web.config file under your ASP.NET 4.5 application as follows:
<configuration>
<system.webServer>
<handlers>
<remove name="aspNetCore"/> <!--add this line-->
</handlers>
</system.webServer>
</configuration>
Details you could follow ASP.NET Configuration File Hierarchy and Inheritance. Also, you could follow this similar issue.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0