azure - HTTP 错误 404.3 - 在带有 asp.net MVC 和 WebAPI 核心 2.1 的 Azure 中找不到
问题描述
大家好我得到以下错误,没有发布错误。并通过部署由 VS 2017 生成的 MVC 核心 2.1 应用程序进行检查,该应用程序还包含字体文件。因为它不会产生任何错误并且运行良好。但是该项目给出了以下例外情况,详细信息是...
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
Most likely causes:
It is possible that a handler mapping is missing. By default, the static file handler processes all content.
The feature you are trying to use may not be installed.
The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)
If ASP.NET is not installed.
Things you can try:
In system.webServer/handlers:
Ensure that the expected handler for the current page is mapped.
Pay extra attention to preconditions (for example, runtimeVersion, pipelineMode, bitness) and compare them to the settings for your application pool.
Pay extra attention to typographical errors in the expected handler line.
Please verify that the feature you are trying to use is installed.
Verify that the MIME map is enabled or add the MIME map for the Web site using the command-line tool appcmd.exe.
To set a MIME type, use the following syntax: %SystemRoot%\windows\system32\inetsrv\appcmd set config /section:staticContent /+[fileExtension='string',mimeType='string']
The variable fileExtension string is the file name extension and the variable mimeType string is the file type description.
For example, to add a MIME map for a file which has the extension ".xyz": appcmd set config /section:staticContent /+[fileExtension='.xyz',mimeType='text/plain']
Warning: Ensure that this MIME mapping is needed for your Web server before adding it to the list. Configuration files such as .CONFIG or dynamic scripting pages such as .ASP or .ASPX, should not be downloaded directly and should always be processed through a handler. Other files such as database files or those used to store configuration, like .XML or .MDF, are sometimes used to store configuration information. Determine if clients can download these file types before enabling them.
Install ASP.NET.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
Detailed Error Information:
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL https://~1GpsLearning:80/Content/fonts/glyphicons-halflings-regular.woff
Physical Path D:\Program Files (x86)\SiteExtensions\Kudu\79.20129.3767\Content\fonts\glyphicons-halflings-regular.woff
Logon Method Anonymous
Logon User Anonymous
解决方案
这是从 2.0 升级到 2.1 的问题,所以我在 2.1 核心中创建了一个新的应用程序,并按原样实现了我的其他代码,一切都运行良好,并且在 azure 上运行非常顺利。
推荐阅读
- android-studio - Android Studio 无法识别 kotlin 关键字?
- algorithm - 需要帮助理解基本的伪代码算法问题
- sql - 在 Oracle 中将多行以逗号分隔为单行
- javascript - jquery-confirm 确认弹窗消失问题
- neo4j - Cypher:apoc.cypher.runFirstColumnMany 的用法在 WHERE 子句中
- android - 安卓浓缩咖啡。测试放置在 ViewGroup 中的视图
- python-3.x - 当我尝试执行它向我显示的文件时?
- css - 如何在 create-react-app 中使用带有 purgecss 的 CSS 模块?
- python - 为什么 numpy.arange(3, 3.9, .01) 中的 3.2 返回 False?
- mysql - 触发防止插入数据而不引发错误