I recently wrote my first ASP .NET Core (3.1) Web App,
Now I'm looking to deploy it to IIS.
Two guides on deploying that I've read mention adding the following code block:
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
However, the Program.cs in My App (as generated by MSVS) simply has:
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
The Startup.cs file has a
public void Configure(...)
method, but this doesn't contain either .UseKestrel() OR .UseIISIntegration()
I've deployed my App to IIS Server (by creating an Application Pool). I get no response at http://localhost/MyApp
I looked at the Windows Application Log, and the logs in C:\inetpub\logs\LogFiles\W3SVC1, but I'm not seeing anything obvious
Any advice on how to diagnose this is appreciated
.UseIISIntegration()I see in other installation guides, i.e. stackify.com/how-to-deploy-asp-net-core-to-iisUseIISIntegrationin the background?