使我的网站与App Services(ASP.NET Core 2.1)一起运行时出现问题

编程入门 行业动态 更新时间:2024-10-11 23:17:22
本文介绍了使我的网站与App Services(ASP.NET Core 2.1)一起运行时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试使用App Services来运行网站,但我所能得到的只是一个一般性的500错误.

该代码可在本地完美运行,目前正在使用Azure DevOps工具进行构建/部署.

应用程序日志什么都没告诉我,我只能找到以下内容:

< ul> < li> IIS收到了请求;但是,在处理请求期间发生内部错误.此错误的根本原因取决于哪个模块处理该请求以及发生此错误时工作进程中发生的情况. < li> IIS无法访问网站或应用程序的web.config文件.如果NTFS权限设置不正确,则会发生这种情况. < li> IIS无法处理网站或应用程序的配置. < li>经过身份验证的用户没有使用此DLL的权限. < li>该请求被映射到托管处理程序,但是未安装.NET扩展功能. </ul>

此外,我在App Services配置页面中启用了aspnet核心扩展,并且我的appsettings.json文件已正确部署(我已经在wwwroot目录中进行了检查)

解决方案

很抱歉听到您的Web应用程序遇到问题.

如果使用Visual Studio,则可以 将调试器附加到应用程序服务.

使用 Kudu ,您还可以检查.NET创建的其他一些日志位置.从错误中得知,似乎最有可能引用了在远程环境中无法访问的文件夹/位置.

I'm trying to run a website using App Services but all I can get is a generic 500 error.

The code works perfectly locally and is currently being built/deployed using Azure DevOps tool.

The App log tells me nothing, all I could find is the following:

<ul> <li>IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.</li> <li>IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.</li> <li>IIS was not able to process configuration for the Web site or application.</li> <li>The authenticated user does not have permission to use this DLL.</li> <li>The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.</li> </ul>

Also, I have aspnet core extensions enabled in the App Services configuration page and my appsettings.json file is being correctly deployed (I've checked it in the wwwroot dir)

解决方案

Sorry to hear that you're encountering issues with your web application.

If you use Visual Studio, you can attach a debugger to the app service.

Using Kudu, you can also check some other log locations that .NET creates. From the error, it sounds like there is most likely a folder/location being referenced that isn't accessible on the remote environment.

更多推荐

使我的网站与App Services(ASP.NET Core 2.1)一起运行时出现问题

本文发布于:2023-11-14 04:02:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586162.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:使我   网站   App   Services   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!