c# - Azure Web 应用程序与 API 通信时出现 HTTP 错误 500 - 如何修复?

标签 c# azure .net-7.0

我正在使用 Azure,有一个 Web 应用程序 (c#) 与 API (c#) 进行通信。部署是使用 Visual studio 完成的,但是当我尝试使用 webapp 调用 api 时,出现以下错误:

HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred. Most likely causes: -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. -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. IIS was not able to process configuration for the Web site or application. -The authenticated user does not have permission to use this DLL. -The request is mapped to a managed handler but the .NET Extensibility Feature is not installed

感谢您的帮助

  • 我重新部署了很多次
  • 检查了网络配置
  • 通信正常,当我发布新内容时,通信停止了
  • .Net 7.0

最佳答案

我只需要在 AZURE -> API APP -> APIs -> 设置中取消选中(或实现)并选中订阅选项

关于c# - Azure Web 应用程序与 API 通信时出现 HTTP 错误 500 - 如何修复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76360234/

相关文章:

c# - Orleans 7.0 序列化程序无法与源自 Nuget 包的 POCO 一起使用

c# - 情态形式消失之谜

c# - MVC : The call is ambiguous between the following methods or properties

c# - C# 未初始化的变量危险吗?

html - 使用 Azure Bot Framework Web 聊天无法单击电话号码

c# - 在 .NET 7 中使用具有最少 API 的 MapGroup

javascript - ASP.NET 使用 jquery 单击时选择表行

azure - 如何将用户路由添加到Azure应用服务

Azure AD B2C 在迁移时更改密码

c# - FluentValidation 自动验证请求 .NET 7 Minimal API