ASP.NET Core 3.0 Extension未添加到路径中 [英] ASP.NET Core 3.0 Extension not being added to path

查看:69
本文介绍了ASP.NET Core 3.0 Extension未添加到路径中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET Core 3.0预览应用程序我试图在Azure App Service上运行。


如果我尝试导航到我获得的网站HTTP错误500.0页面提示我缺少ASP.NET核心版本。



所以我安装了扩展(x64和x86)一起和单独)但错误仍然存​​在。


我可以从安装3.0的DebugConsole上的SiteExtensions文件夹中看到,但如果我尝试从D:\运行我的应用程序site\wwwroot with dotnet .\AKTheKnight.co.uk.dll我得到以下错误:


无法找到任何兼容的框架版本

指定框架'Microsoft.AspNetCore.App',版本'3.0.0-preview3-19153-02'找不到。

  - 检查应用程序依赖性并定位安装在以下位置的框架版本:

      D:\Program Files(x86)\ dotnet \

  - 安装.NET Core先决条件可能有助于解决此问题:

      https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

  - .NET Core框架和SDK可以从以下位置安装:

      https://aka.ms/dotnet-download

  - 安装了以下版本:

      2.1.7在[D:\Program Files(x86)\ dotnet \ Shared \ Microsoft.AspNetCore.App]中,
      2.1.9在[D:\Program Files(x86)\dotnet\shared \ Microsoft.AspNetCore.App]

      2.2.1在[D:\Program Files(x86)\ dotnet \ shared \ Microsoft.AspNetCore.App]

      2.2.3在[D:\Program Files(x86)\dotnet\shared\Microsoft.AspNetCore.App]



如果我然后导航回3.0运行时文件夹(D:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ site \ www.root \ AKTheKnight.co.uk.dll它会正常运行,没有任何问题。



好像是3.0预览运行时未被添加到路径,因此该站点未正常运行。我错过了什么或者它现在坏了吗? 

解决方案

< blockquote>

默认情况下,ASP.NET核心预览版本未部署到Azure App Service。要托管使用ASP.NET Core预览版的应用,请参阅

将ASP.NET Core预览版部署到Azure App Service
检查配置。



您是否收到任何带有错误消息的子状态代码?错误500在启动期间或创建响应时在应用程序代码中发生。响应
可能不包含任何内容,或者响应可能显示为 
> 500内部服务器错误  应用程序事件日志通常表示应用程序正常启动的
。从服务器的角度来看,这是正确的。应用程序确实已启动,但无法生成有效响应



要获取有关错误的更多详细信息,请按照以下文档中的说明启用并分析日志,并告知我们进一步调查:
  ;


在Kudu控制台中运行app
 
启用
ASP.NET核心模块stdout日志

应用程序记录
 


I've got an ASP.NET Core 3.0 preview app I'm attempting to run on Azure App Service.

If I try to navigate to the site I get a HTTP Error 500.0 page suggesting I am missing the ASP.NET Core version.

So I've installed the Extension (Both x64 and x86 together and separately) but the error is still there.

I can see from the SiteExtensions folder on the DebugConsole that 3.0 is installed, but if I try to run my app from D:\site\wwwroot with dotnet .\AKTheKnight.co.uk.dll I get the below error:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '3.0.0-preview3-19153-02' was not found.
  - Check application dependencies and target a framework version installed at:
      D:\Program Files (x86)\dotnet\
  - Installing .NET Core prerequisites might help resolve this problem:
      https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.7 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.1.9 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.2.1 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.2.3 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]

If I then navigate back to the 3.0 runtime folder (D:\home\SiteExtensions\AspNetCoreRuntime.3.0.x86) and run .\dotnet.exe D:\site\wwwroot\AKTheKnight.co.uk.dll It will run fine with no issues.

It seems like the 3.0 preview runtime isn't being added to path and therefore the site is not running properly. Am I missing something or is it broken at the moment? 

解决方案

ASP.NET Core preview releases aren't deployed to Azure App Service by default. To host an app that uses an ASP.NET Core preview release, see Deploy ASP.NET Core preview release to Azure App Service and kindly review the configuration.

Do you receive any sub-status code with the error message? The error 500 occurs within the app's code during startup or while creating a response. The response may contain no content, or the response may appear as a 500 Internal Server Error in the browser. The Application Event Log usually states that the app started normally. From the server's perspective, that's correct. The app did start, but it can't generate a valid response

To fetch more details on the error, enable and analyze the logs as mentioned in the documents below and let us know for further investigation:  

Run the app in the Kudu console enable the ASP.NET Core Module stdout log and Application logging 


这篇关于ASP.NET Core 3.0 Extension未添加到路径中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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