ASP.NET 4.5在ASP.NET Core 2.0应用程序下的Azure Web App中作为虚拟应用程序抛出502.5

问题描述 投票:3回答:1

这是“Running MVC Web app targeting .net 4.6.1 in a virtual directory under a ASP.NET core web app. Is it possible?”的副本,但它没有解决,OP说他通过创建一个额外的应用程序解决了它。所以我再次发布。

我有一个Azure Web App组织如下:

"site/wwwroot/MyWeb.dll" (ASP.NET Core 2.0)
"site/admin/MyAdmin.dll" (ASP.NET 4.5)

网络运行正常。但是当我尝试访问管理站点时,我收到以下错误

HTTP错误502.5 - 进程失败

以下是“... / logFiles / eventlog.xml”的摘录,我认为这是有用的

<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>

随意询问您可能需要的任何信息。提前致谢!

c# asp.net .net azure asp.net-core
1个回答
6
投票

具有物理根“D:\ home \ site \ admin \”的应用程序“MACHINE / WEBROOT / APPHOST / MYAPP / ADMIN”无法使用命令行“dotnet。\ MyWeb.dll”启动进程,ErrorCode ='0x80004005:80008081。

似乎您的ASP.NET 4.5上的虚拟应用程序目标由AspNetCoreModule模块提供服务。您可以修改ASP.NET 4.5应用程序下的web.config文件,如下所示:

<configuration>
  <system.webServer>
    <handlers>
      <remove name="aspNetCore"/> <!--add this line-->
    </handlers>
  </system.webServer>
</configuration>

您可以关注ASP.NET Configuration File Hierarchy and Inheritance的详细信息。此外,你可以遵循这个类似的issue

© www.soinside.com 2019 - 2024. All rights reserved.