ASP.NET Core 2.1 Preview 2 App无法在Azure App Service上运行

山姆

自该版本发布以来,我一直在Azure上运行ASP.NET Core 2.1 Preview-1应用程序。我已经通过门户网站安装了ASP.NET Core运行时扩展,并且运行良好。

现在,Microsoft发布了ASP.NET Core 2.1 Preview-2,我安装了对SDK的升级。更新了我的Nuget软件包,以便所有内容都具有Preview-2版本。请参阅下面的我的csproj文件:在此处输入图片说明

我还从我的应用程序的Azure App Service中删除了显示2.1 Preview-1的ASP.NET Core Runtime扩展。而是分别为x86和x64安装了ASP.NET Core 2.1运行时间-参见下文:在此处输入图片说明

Compiled the app and published it to my Azure App service but I'm getting errors. First I got the 502.5 error. Now, I'm getting:

The specified CGI application encountered an error and the server terminated the process.

What am I missing here?

UPDATE:

As the answer suggested, I set my target to x86 (to play it safe) -- see below:

在此处输入图片说明

I removed the extension and the individual x86 and x64 run times and installed only the x86 with support for ASP.NET Core 2.1 preview-2 -- see below: 在此处输入图片说明

I restarted the app several times and I'm still getting 502.5.

I then tried to do a self deploy through CLI command line by issuing the following command:

dotnet publish -c Release -r win10-x64

And I get the following error:

C:\Program Files\dotnet\sdk\2.1.300-preview2-008530\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(125,5): error : The RuntimeIdentifier platform 'win10-x64' and the PlatformTarget 'x86' must be compatible.

Does this mean I have the x86 version of the SDK installed and I must target x86?

I didn't have half the trouble that I'm going through now going from ASP.NET Core 2.0 to 2.1!!!!

UPDATE 2: Just ran dotnet --info in Kudu console. If I'm reading this correctly, I don't have the correct runtime.

在此处输入图片说明

Update 3:

I think this screen shot confirms what I was saying. 在此处输入图片说明

Update 4:

I installed x86 version of ASP.NET Core 2.1 Runtime -- see below: 在此处输入图片说明

When I run dotnet --info in Kudu console, I get the following which confuses me. I'm still not seeing the version I was expecting to see:

在此处输入图片说明

当我点击该URL时,当我dotnet MyApp.dll告诉我未找到正确版本的运行时时,仍然收到502.5和Kudu控制台中的相同消息

我如何在那里找到正确的版本?我以为可以通过门户网站安装它。

塞尔吉

我们已经成功使用“独立”部署模式将ASP.NET Core 2.1 RC1 Webapp发布到Azure应用服务。

平台目标:任何CPU

以下是来自.csproj的软件包引用:

<PackageReference Include="Microsoft.AspNetCore.App" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.0-rc1-final" PrivateAssets="All" /> <PackageReference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="2.1.0-rc1-final" />

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Azure App Service上的ASP.NET Core 2.1 RC1扩展

Azure App Service无法从VSTS运行Asp.Net Core应用程序

ASP .NET Core 2.1-preview2 HttpClient死锁

ASP.NET Core API-在Azure App Service上获取404,但在Localhost上可以正常运行

无法在WinDGB中打开Azure App Service .NET Core 2转储文件(转储文件中存在2个运行时)

升级到asp.net core rc2后,发布到Azure App Service崩溃

从ASP.NET Core 2 MVC App使用Azure存储引用.NET 4.7.1库

面向完整框架的ASP.NET Core 1.1无法部署到Azure App Service

从ASP.NET Core访问Azure App Service ConnectionString

无法安装.NET Core 1.0 Visual Studio Tooling Preview 2

在Azure App Service的ASP.NET Core中运行Phantomjs.exe

在Azure App Service上远程调试ASP.NET Core 1.0应用程序

将Asp.Net Core 1转换为Core 2后Jwt无法正常工作

交换Azure Web App部署插槽将注销ASP.NET Core RC2中的所有用户

ASP.Net Core 1.0.0-preview2无限重定向循环

在.NET Framework上运行.NET Core App

在Asp.Net Core Web应用程序中使用EasyAuth对Azure App Service上的AAD进行身份验证时,无法填充ClaimsPrincipal

使用ASP.Net Core 2 Web App使用EF6调用完整库

使用Razor从ASP.Net Core 2 Web App调用Web API

linq2db 3.0.0-preview.1 不适用于 .net core 3

在运行Asp.Net Core 2的Webapi 2上,带有Serilog的DI ILogger

将现有的ASP.NET Core Web App转换为在Azure IoT Edge上运行的Edge模块

Visual Studio生成无法在Azure Devops上运行Net Core 3.0 SDK Preview 9

在Azure Web App上使用ASP.Net Core在容器上配置AppSettings:冒号冒号?

在 Google App Engine 上运行最新的 ASP.NET Core 版本

找不到带有Azure DevOps路径的部署ASP.NET Core App Service

如何为ASP.NET Core 3.1配置Azure App Service应用程序设置?

ASP.NET Core应用程序日志未写入Azure App Service中的Blob

如何为我的ASP.NET Core 2.0 API增加Azure App Service的超时