简体   繁体   English

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

[英]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. 这是“ 在ASP.NET核心网络应用程序下的虚拟目录中运行MVC Web应用程序.net 4.6.1的重复。是否可能? ”但它没有解决,OP说他通过创建一个额外的应用程序解决了它。 So I post it again. 所以我再次发布。

I have an Azure Web App organized as follows: 我有一个Azure Web App组织如下:

"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 HTTP错误502.5 - 进程失败

The following is an extract from ".../logFiles/eventlog.xml" which I thought was useful 以下是“... / 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>

Feel free to ask for any kind of info you may need. 随意询问您可能需要的任何信息。 Thanks in advance! 提前致谢!

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

It seems that your virtual application targets on ASP.NET 4.5 is served by the AspNetCoreModule module. 似乎ASP.NET 4.5上的虚拟应用程序目标由AspNetCoreModule模块提供服务。 You could modify the web.config file under your ASP.NET 4.5 application as follows: 您可以修改ASP.NET 4.5应用程序下的web.config文件,如下所示:

<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 . 您可以遵循ASP.NET配置文件层次结构和继承的详细信息。 Also, you could follow this similar issue . 此外,您可以遵循这个类似的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM