c# - 升级到 DotNet Core 2.2 后,Azure 应用服务无法运行

标签 c# .net azure .net-core azure-web-app-service

DotNet Core 2.2 发布后,我将解决方案升级到新版本,但当我将其部署到 Azure 应用服务时,它不再运行。它只是给出以下错误: 由于发生内部服务器错误,该页面无法显示。

我的 .csproj 文件如下所示,以防您需要它:

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.0.2105168" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\DAL\DAL.csproj" />
    <ProjectReference Include="..\Model\Models.csproj" />
  </ItemGroup>

  <ItemGroup>
    <WCFMetadata Include="Connected Services" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="wwwroot\userPictures\" />
  </ItemGroup>

</Project>

最佳答案

asp.net core 2.2 更新似乎尚未完全推广到 Azure 应用服务的所有区域。请参阅:https://blogs.msdn.microsoft.com/webdev/2018/12/04/asp-net-core-2-2-available-today/

他们表示将在未来几周内推出并于 12 月底完成。

似乎有某种解决方法,尽管我不知 Prop 体细节: https://github.com/dotnet/core/blob/master/release-notes/2.2/2.2-known-issues.md

关于c# - 升级到 DotNet Core 2.2 后,Azure 应用服务无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53620726/

相关文章:

c# - 如何使用 c# Winforms 执行字符串和整数?

c# - 异步方法在当前线程(主线程)启动AsyncCallback

azure - DocumentDB 中超出了 'Document' 的存储配额

sql-server - 将两个源映射到目标 SQL DB 表

azure - 通过Azure数据工厂创建blob存储容器

c# - 在 C# 中使用 HtmlAgilityPack 解析 html

c# - 如果 C# async/await 仍然等待上一次执行完成,它有什么好处?

c# - 如何使用 MVC Web API 进行身份验证?

c# - 加密c#和mysql之间的数据流量

.net - 从 .NET 中的 Form 类派生