【发布时间】:2019-07-06 23:59:15
【问题描述】:
在我尝试访问 IIS 后,我收到错误消息: 服务不可用
HTTP 错误 503。服务不可用。
接下来我该怎么做?
我使用带有 IIS 8.5 的 Windows Server 2008(64 位)。该应用程序是 web api .NET CORE 2.2.1。
在我安装的 Windows 机器上:
- Microsoft .NET CORE 2.2.1 - Windows 服务器托管
- Microsoft .NET CORE 运行时 - 2.2.1(x64)
- Microsoft .NET CORE 运行时 - 2.2.1(x86)
- Microsoft Visual C++ 2015 Redistributable(x86) - 14.024212
- Microsoft Visual C++ 2015 Redistributable(x64) - 14.024123
- Microsoft Visual C++ 2008 Redistributable - x86 - 9.0.30729.4148
- Microsoft Visual C++ 2008 Redistributable - x64 - 9.0.30729.6161
我从视觉工作室制作了一份出版物。进入模块上的 IIS 我有 AspNetCoreModuleV2。
我拥有的 webconfig 文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\App.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 9d04b7be-318b-4e95-aae3-c47aab07db30-->
来自 CreateWebHostBuilder 方法的代码:
return WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>().UseSerilog((ctx, cfg) =>
{
cfg.ReadFrom.Configuration(ctx.Configuration)
.MinimumLevel.Verbose()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information);
});
【问题讨论】:
-
检查 EventViewer->Windows 日志->服务器上的应用程序是否有任何错误。
-
eventViewer 中没有错误。
-
docs.microsoft.com/en-us/aspnet/core/host-and-deploy/… 还有更多需要检查(一旦您重新启用应用程序池)。
标签: c# visual-studio windows-server-2008 iis-8.5