Dear All,
Am writing below instructions to help out anyone who is having difficulties using UniversalDashboard with IIS.
In this example am using Microsoft Windows Server 2016 or 2019 to leverage HTTP2, same steps will also work on previews versions of windows but you will be using HTTP1 protocol instead.
let us begin…
1- install your preferred version of Microsoft Windows Server (going to use 2019 in this example)
2- Follow instruction in the following link to install IIS using Server Manager
3- Make sure to install WebSocket protocol during the installation of IIS
4- Install ASP.NET Core Runtime 3.1.0 Hosting Bundle for Windows from the following link
5 - Install UniversalDashboard.Community from below link using powershell gallery
6- Create a website in IIS and configure the AppPool with an account with privileges
7- copy UniversalDashbard.community module contents(e.g C:\Program Files\WindowsPowerShell\Modules\UniversalDashboard.Community\2.8.1) into the root folder of your website created in previews step.
8- At the Root of the created website create a file named dashboard.ps1 and copy below code into it and save it
Start-UDDashboard -Port 80 -Wait -Dashboard (
New-UDDashboard -Title "Powershell UniversalDashboard" -Content {
New-UDButton -Id "test" -Text "test" -BackgroundColor "#6f42c1" -onClick {}
}
)
9- launch your website and you should see a demo dashboard which an indication of a successful installation.
All done…
Note: its very important to use steps above as listed, for example if you install ASP.NET Core Runtime 3.1.0 before IIS you will end up with an error when you are done and in this case you need to reinstall ASP.NET Core Runtime 3.1.0 after you complete IIS installation steps.
Happy Coding…