I am trying to host a ASP.net Core WebAPI like the Microsoft Docs tell me: Hosting in ASP.NET Core
Configuration
I am Running IIS 10 on Windows Server 2016, where Web Deploy 3.6, .Net Core Runtime 2.0.7 and .NET Core Server Hosting Bundle is installed.
The Web API is configured as follows:
Program.cs :
public static IWebHost BuildWebHost(string[] args) {
IConfigurationRoot config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json")
.Build();
return WebHost.CreateDefaultBuilder(args)
.UseConfiguration(config)
.UseStartup<Startup>()
.UseKestrel(opt => {
opt.Listen(IPAddress.Loopback, 4000);
})
.UseIISIntegration()
.Build();
}
web.config :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="dotnet" arguments=".\Agent.DuZu.Web.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
On the IIS, the ASP.net Core Module is activated and i have a Site with a binding on port 80.
Problem
I am publishing the App on the server with WebDeploy, but the Application just won't start. There is no Output nor Error. I'm not sure if i am missing something or if my Configuration is just fail. Also I would like to know, if there is a way to see the running App.