相关疑难解决方法(0)

如何设置“web.config”文件以显示完整的错误消息(.NET Core 2.1)

我在IIS上托管了我的 ASP.NET Core 应用程序(使用文件夹内发布方法)。我尝试创建自己的web.config文件以查看客户端的详细错误消息。所以我添加了文件web.config

<configuration>
    <system.web>
        <customErrors mode="Off" />
    </system.web>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

我重新启动 IIS 后,什么也没发生。客户端仍然收到默认错误:

在此处输入图片说明

我可以使用文件web.config以某种方式获取有关错误的其他信息吗?

web-config iis-10 asp.net-core

6
推荐指数
3
解决办法
1万
查看次数

Azure 网站上的 .NET CORE 3.1:500.37 ANCM 无法在启动时间限制内启动

我有部署在 Azure Web 应用程序服务中的 .NET Core 3.1 API。由于错误500.37 ANCM Failed to Start Within Startup Time Limit ,我在 Azure 中运行应用程序时遇到问题。我通过增加 web.config 中的 startupTimeLimit 设法解决了这个问题(如下所示)。

但是现在,当我在 Azure Web 应用服务中运行 2 个实例时。其中一个实例工作正常,但另一个实例仍然存在相同的错误。

关于如何在 IIS 中为多个实例设置 startupTimeLimit 的任何想法?

网页配置

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <!-- To customize the asp.net core module uncomment and edit the following section. 
  For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\Clients.Api.dll" …
Run Code Online (Sandbox Code Playgroud)

iis azure .net-core azure-web-app-service asp.net-core

5
推荐指数
1
解决办法
6877
查看次数

ASP.NET Core发布错误:启动应用程序时发生错误

我试图在Windows Server 2008 R2上发布我的ASP.NET核心应用程序,但是我收到此错误:"启动应用程序时出错."

没有更多的描述!

我能做什么?

asp.net asp.net-core-mvc asp.net-core visual-studio-2017 asp.net-core-1.1

4
推荐指数
2
解决办法
5978
查看次数