I'm trying to deploy selfhosted Asp.Net Core WebApi. I replaced the default Kestrel web server with Http.sys. I'm deploying on a virtual machine with Windows Server 2016. When I request the api locally (from the virtual machine) I can access it without any problems on http://localhost:61152. The problem is that I can't access it from the host machine. I opened the port 61152 in the Windows Firewall. In the program.cs I have:
.UseStartup<Startup>().UseHttpSys(options =>
{
options.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM;
options.Authentication.AllowAnonymous = false;
options.MaxConnections = null;
options.MaxRequestBodySize = 30000000;
options.UrlPrefixes.Add("http://localhost:61152/");
}).Build();
I use asp.net core 2.0. I browse with the IP of the server which like this: http://192.168.0.112:61152/
Also I have IIS running on the guest machine and I can see the default IIS page.
Can you please tell what I'm doing wrong or direct me to an article how to fix this. Thanks