Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET 4.5 throws 502.5 as a virtual application in Azure Web App under a ASP.NET Core 2.0 application

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:\home\site\admin\' 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!

like image 598
Vsoulas Grape Avatar asked Dec 05 '25 14:12

Vsoulas Grape


1 Answers

Application 'MACHINE/WEBROOT/APPHOST/MYAPP/ADMIN' with physical root 'D:\home\site\admin\' 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.

like image 51
Bruce Chen Avatar answered Dec 07 '25 10:12

Bruce Chen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!