从.NET Core 1.1.1升级到.NET Core 1.1.2后,Azure上的ASP.NET Core网站无法启动并出现502.5错误 [英] ASP.NET Core website on Azure fails to start with a 502.5 error after upgrade from .NET Core 1.1.1 to .NET Core 1.1.2

查看:93
本文介绍了从.NET Core 1.1.1升级到.NET Core 1.1.2后,Azure上的ASP.NET Core网站无法启动并出现502.5错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET Core Web应用程序,可以作为Azure Web App部署。



直到昨晚应用Visual Studio 2017时,它一直运行良好升级(v15.2)。



.net核心版本已从1.1.1升级到1.1.2。当我部署到Azure时,网站无法启动并出现502.5错误。



调查之后,我发现.NET Core 1.1.2尚未部署到Azure映像。 / p>

我无法将新框架安装到Web应用程序实例上(可以理解,Program Files目录上的权限被拒绝了)。我无法通过nuget软件包管理器进行降级,因为它报告版本已被项目阻止。我看不到在csproj文件中定义Microsoft.NETCore.App版本的方法,因为这似乎由根< Project Sdk = Microsoft.NET.Sdk.Web > 元素。



我尝试了一个自包含的部署(使用Web应用程序运送框架),但是无法获得



等待将新版本部署到Azure的时间很短(我无法在他们的日程安排上找到任何信息)是否有人对此有任何想法



有什么方法可以强制其在1.1.1以下运行?

解决方案

更新5/12/2017 :我们已加快1.1.2和1.0.5到App Service的部署,现已完成。因此,任何人都不再需要下面的解决方法。



原始解决方案



最佳解决方法是在.csproj文件中进行设置:

 < TargetFramework> netcoreapp1.1.1< / TargetFramework> 

而不是将其设置为 netcoreapp1.1



请注意,如果将其设置为<$,则将在星期二之前将1.1.2部署到Azure App Service。

c $ c> netcoreapp1.1.1 ,一旦1.1.2可用,它将自动前滚至该位置。因此,将其设置为 netcoreapp1.1.1 不会使您陷入该版本。只要您使用可移植模式(即依赖于操作系统上的框架),这都是正确的。如果您使用独立服务器并部署自己的框架,那么您将受其束缚(但是首先您就不会遇到这个问题,也不需要这样做!)。


I have a .NET Core web application which I deploy as an Azure Web App.

This has been working perfectly until last night when I applied the Visual Studio 2017 upgrade (v15.2).

The .net core version was upgraded from 1.1.1 to 1.1.2. When I deploy to Azure the website fails to start with a 502.5 error.

After investigating I can see .NET Core 1.1.2 is not deployed to the Azure image.

I cannot install the new framework to the web app instance (understandably permission is denied on the Program Files directory). I cannot 'downgrade' through the nuget package manager as it reports the version is 'Blocked by the project'. I cannot see a way to define the version of Microsoft.NETCore.App in the csproj file as it seems this is 'automagically' controlled by the root <Project Sdk="Microsoft.NET.Sdk.Web"> element.

I have tried attempting a self contained deployment (shipping the framework with the web app) but can't get this working either.

Short of waiting for the new version to be deployed to Azure (I can't find any information on their schedule for this) does anyone have any ideas on how to get the web app working again?

Is there any way to force it to run under 1.1.1?

解决方案

Update 5/12/2017: we have accelerated the deployment of 1.1.2 and 1.0.5 to App Service and it is now complete. So the workaround below should no longer be needed by anyone.

Original solution

The best workaround is to set this in your .csproj file:

<TargetFramework>netcoreapp1.1.1</TargetFramework>

Instead of it being set to netcoreapp1.1. We will have 1.1.2 deployed to Azure App Service by Tuesday, at which point the workaround won't be necessary.

Note that if if you set it to netcoreapp1.1.1, once 1.1.2 is available it will auto-roll forward to that. So setting it to netcoreapp1.1.1 does not keep you 'stuck' to that version. This is true as long as you use Portable mode (i.e. rely on the framework that's on the OS). If you use standalone and deploy your own framework, then you would be stuck to it (but then you would not have had this issue in the first place and would not have needed to do that!).

这篇关于从.NET Core 1.1.1升级到.NET Core 1.1.2后,Azure上的ASP.NET Core网站无法启动并出现502.5错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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