I have successfully deployed an ASP.NET Core 2.0 (MVC) on Win IoT Core (running on Rasp Pi 3). The device is listening on 192.168.0.14:80.
I activate the application via PowerShell (from my host computer connected to the device) as follows.
The problem is that if I close the PowerShell window, the server stop listening.
Question
How to active the web application as a service that is always running even after restarting the device?
You should try connectin to the RPi:
Enter-PSSession -ComputerName <Raspberry IP> -Credential <Raspberry IP>\Administrator
And then schedule a task:
schtasks /create /tn "Startup Web" /tr c:\Startup.bat /sc onstart /ru SYSTEM
Where startup.bat executes a powershell script with something like:
Set-Location C:\publish\ .\aspnet.on.rpi.exe
Check this post for a complete sample: https://carlos.mendible.com/2017/03/26/raspberry-pi-run-aspnet-core-on-startup/