I have a simple .NET network web interface with one action:
[Route("[action]")]
public class APIController : Controller
{
[HttpGet]
public string Ping()
{
return DateTime.Now.ToString();
}
}
If I run this through the dotnet run, I get
Hosting environment: Production
Content root path: C:\Users\xxx\Documents\Visual Studio 2015\Projects\SelfHostTest\src\SelfHostTest
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
Going to the browser and entering http: // localhost: 5000 / ping results in a successful return of the current time. However, going to a remote computer (the same LAN) and trying to access the service via http: // odin: 5000 / ping , error 404 occurs. (Odin is the name of the machine running the web api in the console through the dotnet run )
Server (and client!) Firewalls are disabled. I can ping "odin" successfully.
Any ideas what a simple step I am missing here. I tried this at home and at work without success.