我在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以某种方式获取有关错误的其他信息吗?
我有部署在 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) 我试图在Windows Server 2008 R2上发布我的ASP.NET核心应用程序,但是我收到此错误:"启动应用程序时出错."
没有更多的描述!
我能做什么?
asp.net asp.net-core-mvc asp.net-core visual-studio-2017 asp.net-core-1.1