I’ve got UD running in IIS and the controls load on the site but none of the data is actually being loaded. I just have a simple dashboard with the UDMonitor example from the docs page. I have the -wait -autoreload parameters on the dashboard and recycle the app pool after any changes.
I also checked the network tab in F12 and I can see it reaching out and trying to run UDMonitor but nothing is ever loaded.
I’m sure it’s something simple I’m just overlooking but I can’t find anything. Any help is appreciated.
Did you download the .Net Core Runtime and Hosting Bundle ?
Also, can you confirm you enabled the WebSocket Protocol feature of IIS ?
If the websocket feature is not enabled, anything using data / endpoints will not work.
Source: https://docs.universaldashboard.io/running-dashboards/iis
I’m running the latest version of the runtime and hosting bundle (2.2.1) instead of 2.1.5. I also double checked that I have the WebSocket feature enabled. Below is the dashboard I’m testing in IIS right now using the examples from the documentation. The chart changes and updates with the random values but the monitor doesn’t load anything. It’s just a blank monitor.
$dashboard = New-UDDashboard -Title "Test" -Content {
New-UDRow -Columns {
New-UDColumn -SmallSize 6 -Content {
New-UDChart -Title "Favorite Sport by Country" -Id "FavSportByCountry" -Type Bar -AutoRefresh -RefreshInterval 7 -Endpoint {
$features = @();
$features += [PSCustomObject]@{ "Country" = "United States"; "Football" = (Get-Random -Minimum 10 -Maximum 10000); "Baseball" = (Get-Random -Minimum 10 -Maximum 10000); "Curling" = (Get-Random -Minimum 10 -Maximum 10000) }
$features += [PSCustomObject]@{ "Country" = "Switzerland"; "Football" = (Get-Random -Minimum 10 -Maximum 10000); "Baseball" = (Get-Random -Minimum 10 -Maximum 10000); "Curling" = (Get-Random -Minimum 10 -Maximum 10000) }
$features += [PSCustomObject]@{ "Country" = "Germany"; "Football" = (Get-Random -Minimum 10 -Maximum 10000); "Baseball" = (Get-Random -Minimum 10 -Maximum 10000); "Curling" = (Get-Random -Minimum 10 -Maximum 10000) }
$features += [PSCustomObject]@{ "Country" = "Brazil"; "Football" = (Get-Random -Minimum 10 -Maximum 10000); "Baseball" = (Get-Random -Minimum 10 -Maximum 10000); "Curling" = (Get-Random -Minimum 10 -Maximum 10000) }
$features| Out-UDChartData -LabelProperty "Country" -Dataset @(
New-UDChartDataset -DataProperty "Football" -Label "Football" -BackgroundColor "#8052FFC7" -HoverBackgroundColor "#FF52FFC7"
New-UDChartDataset -DataProperty "Baseball" -Label "Baseball" -BackgroundColor "#80E841C8" -HoverBackgroundColor "#FFE841C8"
New-UDChartDataset -DataProperty "Curling" -Label "Curling" -BackgroundColor "#8052E837" -HoverBackgroundColor "#FF52E837"
)
}
}
New-UDColumn -SmallSize 6 -Content {
New-UdMonitor -Title "CPU (% processor time)" -Type Line -DataPointHistory 20 -RefreshInterval 5 -ChartBackgroundColor '#80FF6B63' -ChartBorderColor '#FFFF6B63' -Endpoint {
Get-Counter '\Processor(_Total)\% Processor Time' -ErrorAction SilentlyContinue |
Select-Object -ExpandProperty CounterSamples |
Select-Object -ExpandProperty CookedValue |
Out-UDMonitorData
}
}
}
} -BackgroundColor '#6B8493' -NavBarColor '#4D4D4D'
Start-UDDashboard -Dashboard $dashboard -AutoReload -Wait
If its any consolation, your code works on my IIS hosted dashboard.
I would maybe look into what account the application pool is running under.
my Dashboard is running the default ApplicationPoolIdentity.
Edit: Wring site, the App pool is actually running with a service account that full on admin on the server.
So it was definitely a permissions problem. I changed the identity from ApplicationPoolIdentity to LocalSystem and it started working.
I really need to get better at IIS cause I have no idea what needs permissions to what. Thanks for the help though!
NP!
I’m a noob at IIS to but once in a blue moon I manage to guess something right