I have a working UD I want to run as a service on a Windows server.
It was correctly installed with Publish-UDDashboard but refuses to start.
The Eventviewer shows the following:
Error starting dashboard:
Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of RemoteSigned. Type “Get-ExecutionPolicy -List” to view your execution policy settings. For more information please see “Get-Help Set-ExecutionPolicy”.
at , : line 1
Our servers are centrally managed and don’t allow to change the ExecutionPolicy on server level.
Can I start the Dashboard service in another way?
RemoteSigned All remote scripts (UNC) or downloaded need to be signed.
Since the scripts are local to the server they don’t need to be signed.
I have the impression that UniversalDashboard.Server.exe tries to change the ExecutionPolicy which throws an error, probably even before opening the script.
I attempted to upgrade to start using v2.7 and I am seeing the same error when running under IIS. As Publish-UDDashboard is not coming into play, is there some way to disable Execution Policy change this when running just Start-UDDashboard with an object created by New-UDDashboard under IIS? v2.4.1 is my current version and I see no such error.
I have not, but I am not running UD as a service, I am running it under IIS. My dashboard.ps1 called by the web.config is running Start-UDDashboard, does that in turn call Publish-UDDashboard which looks to run sc.exe to create a separate service?
Although now it seems that AD Claims based auth is broken with v2.7 as none of my pages work unless I remove the -AuthorizationPolicy option. They were all working with 2.4.1 and nothing changed other than the UD Module version. Has anything changed with Claims based Auth from 2.4.1 to 2.7 that would explain this? I see in the release notes that it should be reading all policies and cachine, but not sure why it would fail to read valid policies?
When I run the $ClaimsPrincipal.HasClaim() from the Design Terminal in v2.7, it evaluates to TRUE, but in the Debug Log I see “No valid authorization policies for session.” If I roll back to 2.4.1 it starts working again.
Thank you, that works. Strange, I thought of that but when I tried $User.HasClaim() from within the Terminal on 2.7 I got an error as it was interpreting $User as a string so I did not try it in code. Anyway, thanks!