- Log in to the WIN2016IIS server (this is not Nano Server, but a normal server). Open Internet Explorer and type in the address bar http://www.iis.net/downloads/microsoft/httpplatformhandler to download HttpPlatformHandler x64, as shown here:
- Click on the selected link, and it will start downloading HttpPlatformHandler.
- Run HttpPlatformHandler on WIN2016IIS. You will get the installation page of HttpPlatformHandler, as shown here:
- Click on Next, follow the default steps, and finish the installation of HttpPlatformHandler.
- On the WIN2016IIS server, go to C:WindowsSystem32inetsrv, find httpPlatformHandler.dll, and copy it to the desktop of the WIN2016IIS server. I have created a folder named ASP Net coreASP.net, and I will paste httpPlatformHandler.dll in it. Now, go to C:WindowsSystem32inetsrvconfigschema and copy httpplatform_schema.xml to Asp Net coreASP.net, as shown here:
- As shown in the screenshot, we have copied the httpplatform_schema.xml and httpPlatformHandler.dll files.
- Copy httpPlatformHandler.dll from ASP Net CoreASP.net, remotely access the Nano Server location \172.16.15.63c$WindowsSystem32inetsrv, and paste it, as shown here:
- Copy httpplatform_schema.xml from ASP Net Coreasp.net, remotely access the Nano Server location \172.16.15.63c$WindowsSystem32inetsrvconfigschema, and paste it.
- Log in to Windows Server 2016. The IP is 172.16.15.60 and the name of the server is WIN2016IIS. Press Windows + R on your keyboard, and you will get the Run window. Open PowerShell ISE with administrative rights, type in the Run command window
RunAs /user:Administrator PowerShell_ISE.exe, and press OK.
In this command, Administrator is the username for that machine; you can use any username that has administrator rights to perform the given task.
- Now it will ask you the administrator password for your Windows Server 2016 (not Nano Server) instance. Type the administrator password and press Enter. You will get the PowerShell window.
- Now you have to remotely connect to Nano Server 2016 at 172.16.15.63. Run the command Enter-PSSession –ComputerName "172.16.15.63" -Credential ~Administrator.
Now you will get a popup window for the Nano Server administrator account password. Enter the password and press OK to log in. You have now connected successfully. Write Import-module iisAdministration and press Enter. This will import the PowerShell module. - Now you need to install the Reverse Forwarders packages, which you created in the Packages folder in the Nano Server C: drive, and copy the Nano Server Packages, as shown here:
- Type the dism/online/addpackage/packagepath:c:packagesMicrosoft-OneCore-ReverseForwarders-Package.cab and dism /online /add-package /packagepath:c:packagesen-usMicrosoft-OneCore-ReverseForwarders-Package.cab DISM commands and run them, as shown here:
- Let's move on to configuring ASP.NET Core. We have already copied the required DLL and XML files. Type the following commands in PowerShell:
$sm = Get-IISServerManager
$sm.GetApplicationHostConfiguration()
.RootSectionGroup.Sections.Add("appSettings")
$appHostconfig =
$sm.GetApplicationHostConfiguration()
$section =
$appHostconfig.GetSection
("system.webServer/handlers")
$section.OverrideMode="Allow"
$sectionHttpPlatform =
$appHostConfig.RootSectionGroup.SectionGroups
["system.webServer"].Sections.Add("httpPlatform")
$sectionHttpPlatform.OverrideModeDefault = "Allow"
$globalModules = Get-IISConfigSection
"system.webServer/globalModules" | Get-
IISConfigCollection
New-IISConfigCollectionElement $globalModules -
ConfigAttribute
@{"name"="httpPlatformHandler";
"image"="%SystemRoot%system32inetsrv
httpPlatformHandler.dll"}
$modules = Get-IISConfigSection
"system.webServer/modules" | Get-IISConfigCollection
New-IISConfigCollectionElement
$modules -ConfigAttribute
@{"name"="httpPlatformHandler"}$sm.CommitChanges()
- You can see in the screenshot that we've configured the required steps to run ASP.NET Core on Nano Server. However, you have to do a few more things in your core application and publish the code with the DNU publish command. You can find out more at https://blogs.iis.net/davidso/nano/aspnet.