After I published my up to IIS when I try to access it I get the error: Service Unavailable
HTTP Error 503. The service is unavailable.
What should I do next?
I use Windows Server 2008(64 - bit) with IIS 8.5. The app is web api .NET CORE 2.2.1.
On the Windows machine I have installed:
- Microsoft .NET CORE 2.2.1 - Windows Server Hosting
- Microsoft .NET CORE Runtime - 2.2.1(x64)
- Microsoft .NET CORE Runtime - 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
I made a publication from the visual studio. Into IIS on modules i have AspNetCoreModuleV2.
The webconfig file I have:
<?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-->
Code from CreateWebHostBuilder Method:
return WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>().UseSerilog((ctx, cfg) =>
{
cfg.ReadFrom.Configuration(ctx.Configuration)
.MinimumLevel.Verbose()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information);
});