HTTP 错误 500.35 - ANCM 同一进程中有多个进程内应用程序 - Azure 应用服务 dotnet 5 [英] HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process - Azure App Service dotnet 5

查看:70
本文介绍了HTTP 错误 500.35 - ANCM 同一进程中有多个进程内应用程序 - Azure 应用服务 dotnet 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Azure Web 应用服务中部署 2 个不同的项目.该服务配置为运行 dotnet 5.我正在使用虚拟目录在此应用服务中部署 3 个应用程序.默认应用程序(dotnet 5 应用程序)运行良好.在第一个子站点上,如果我部署了 dotnet 2.1 应用程序,则效果很好.但是当我尝试在第二个子站点上部署 dotnet 5 应用程序时,它显示了所提到的错误 - 添加了它的图像

I am deploying 2 different projects in an azure web app service. The service is configured to be running dotnet 5. I am using virtual directory to deploy 3 applications in this app service. The default app, a dotnet 5 app, runs fine. On the first subsites if I deploy a dotnet 2.1 app, that works perfectly. But when I try to deploy a dotnet 5 app on the second subsite it shows the mentioned error in question - added an image of it

据我所知,这可能是因为它们共享相同的应用程序池.我尝试了以下内容:

As far as I understood this is probably happening because they share same application pool. I tried the following stuffs:

  • 作为独立应用部署
  • 根据 这个答案(以及来自该链接的更多答案)
  • Deployed as a self-contained app
  • Added AspNetCoreModuleV2 and out of process tags in csproj files of all projects as per this answer (and a few more answers from that link)

坦率地说,我在网上找不到太多帮助,也不确定如何进行.

Frankly speaking I couldnt find much help in the net and not really sure how to proceed with this.

推荐答案

请尽量按照这个顺序

第 1 步 -

  • 关闭您的解决方案
  • 删除.vs文件夹中的applicationhost.config 删除整个.vs文件夹(这将清除所有缓存 - 旧 dll)..vs 文件夹是隐藏文件夹
  • 重新启动您的解决方案
  • Close your solution
  • Delete applicationhost.config in folder .vs or delete the whole .vs folder ( this will clear all the cache - old dlls). .vs folder is a hidden folder
  • Restart your solution again

第 2 步 -

更改您的 Web 应用程序以及从InProcess"部署的任何其他虚拟应用程序;托管模型到OutOfProcess".将以下值添加到每个项目文件 (.csproj):

Change your web application as well as any other virtual application deployed from "InProcess" hosting model to "OutOfProcess".Add the following value to each project file (.csproj):

<PropertyGroup>
  <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>

在 azure 中部署您的应用程序后,确认 web.config 文件中发生了一些变化,如下所示

After deploying your application in azure verify that few changes has taken place in web.config file which looks like below

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet"
                  arguments=".MyApp.dll"
                  stdoutLogEnabled="false"
                  stdoutLogFile=".logsstdout"
                  hostingModel="OutProcess" />
    </system.webServer>
  </location>
</configuration>

参考MS 文档

这篇关于HTTP 错误 500.35 - ANCM 同一进程中有多个进程内应用程序 - Azure 应用服务 dotnet 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆