且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Web Deploy在Azure中部署普通的ASP.NET Core 2.2 Web App会引发错误

更新时间:2023-02-16 13:52:42

默认情况下,ASP.NET Core 2.2应用程序配置为使用新的In Process托管模型.直到2018年12月某个时候,该功能才在所有地区的Azure上提供.他们提到它

By default ASP.NET Core 2.2 apps are configured to use the new In Process hosting model. This will not be available on Azure in all regions until sometime in December 2018. They mention it here.

目前的解决方案是在Web应用程序的.csproj文件顶部添加以下内容:

The solution for now is to add the following at the top of your web app's .csproj file:

  <PropertyGroup>
    <AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
  </PropertyGroup>