ironmansoftware / universal-dashboard

Build beautiful websites with PowerShell.
https://universaldashboard.io
GNU Lesser General Public License v3.0
449 stars 85 forks source link

Windows Service and Scheduled Endpoints - Not seeing dashboard content #522

Closed phobos711 closed 4 years ago

phobos711 commented 5 years ago

I'm using Publish-UDDashboard to run my dashboard script as a Windows Service, so it can run indefinitely without needing to manually start it on the Windows Server it’s running on.

https://adamdriscoll.gitbooks.io/powershell-universal-dashboard/content/running-dashboards/windows-service.html

The 'PowerShell Universal Dashboard' windows service starts without issue, however the dashboard never displays content from cached variables, which should be pulled from the scheduled endpoint.

https://adamdriscoll.gitbooks.io/powershell-universal-dashboard/content/endpoints/scheduled-endpoints.html

When running the same dashboard script from ISE, the content that is pulled from the scheduled endpoint is displayed correctly on the dashboard. When running the Windows Service, the content is never displayed. It's almost as if the scheduled endpoint never runs.

Start-UDDashboard -Dashboard $Dashboard -Port 443 -Endpoint @($EveryFourHours)

Module version: 2.2.0

Thanks!

adamdriscoll commented 5 years ago

Strange! Can you do me a favor and try to enable logging?

Enable-UDLogging -FilePath #<somepath>

It might not work because of #521 but will try to get out a build in the next couple days that fixes that. Logging is important!

phobos711 commented 5 years ago

Hey Adam - just an update, I enabled logging but am experiencing the same issue reported in #521

I'll retry and provide logs after this bug is fixed. Thanks!

OpsEng commented 5 years ago

Just to add... same problem with IIS. Bodged by wrapping page contents in a UDRow with a long AutoRefresh interval. Works fine from a console window.

UD v. 2.4

phobos711 commented 4 years ago

Confirmed that this issue is no longer occurring in version 2.8.1