Deploy .NET Core applications on Nano Server
Nano Server can be used to host ASP.NET Core applications. In this section, we will be using VM created in Azure to host an ASP.NET Core application. Before proceeding we would need a published version of ASP.NET Core application, this can be copied from c:\learningwsc\chapter12\sampleaspnetcoreapp
. The following steps are valid for Nano Server created On-Premise or Azure:
- Open a PowerShell windows under elevated mode and run the following command to create a new PowerShell session to the Nano Server:
$ip = "<<IP Address of Nano Server>>" Set-Item WSMan:\localhost\Client\TrustedHosts -Value $ip $cred = Get-Credential $session = New-PSSession -ComputerName $ip -Credential $cred
- The following image shows a successful connection to server:
- Run the following command in the remote PowerShell mode to open a firewall port to let IIS listen for incoming traffic on port
TCP/8000
:
New-NetFirewallRule -Name "AspNet5 IIS" -DisplayName...