自该版本发布以来,我一直在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] 删除。
我来说两句