Wondering if anyone else has attempted and maybe got the UA dashboard up and running via IIS instance with windows auth.
I startup my UA server, and then i setup my dashboard.ps1 for the IIS instance to Connect-UAServer , then follow the basic idea of the sample scripts in the documentation for UA Dashboard
variable for New-UADashboard
setup my authpolicies and methods
create New-UDLoginPage, store in $dashboard.loginpage
Start-uddashboard etc.
When this starts I go to the page for the UA Dashboard and it just goes to a blank page.
adam
January 23, 2020, 8:21pm
2
I havenât tried to setup UA in IIS yet. I donât see why a UA dashboard wouldnât work like any other dashboard. Can you press F12 in your browser to see if there are any errors in the page? Itâs weird itâs just blank
Seeing this on console tab.
Failed to load resource: :10001/api/interal/dashboard:1
the server responded with a status of 500 ()
adam
January 23, 2020, 9:12pm
4
Can you enable logging for UD?
In the dashboard.ps1, just plop Enable-UDLogging -FilePath
We should be able to see whatâs causing that 500.
Iâve got udlogging enabled but no logfiles has created for the page, so i have no data to look at.
adam
January 23, 2020, 9:33pm
6
Make sure the AppPool user has the permission to write to the location youâve defined
1 Like
server name changed to protect the innocent :)
15:47:27 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/
15:47:27 [Warn] Microsoft.AspNetCore.Session.SessionMiddleware Error unprotecting the session cookie.
15:47:27 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 24.6445ms 200 text/html; charset=utf-8
15:47:27 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/main.f2d62da654956d044bb1.bundle.js
15:47:27 [Info] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware Sending file. Request path: '/main.f2d62da654956d044bb1.bundle.js'. Physical path: 'C:\inetpub\UDRestAPI\client\main.f2d62da654956d044bb1.bundle.js'
15:47:27 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 33.3015ms 200 application/javascript
15:47:27 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/vendor.f2d62da654956d044bb1.bundle.js
15:47:27 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/main.f2d62da654956d044bb1.bundle.map
15:47:27 [Info] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware Sending file. Request path: '/main.f2d62da654956d044bb1.bundle.map'. Physical path: 'C:\inetpub\UDRestAPI\client\main.f2d62da654956d044bb1.bundle.map'
15:47:27 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 47.0151ms 200 text/plain
15:47:27 [Info] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware Sending file. Request path: '/vendor.f2d62da654956d044bb1.bundle.js'. Physical path: 'C:\inetpub\UDRestAPI\client\vendor.f2d62da654956d044bb1.bundle.js'
15:47:27 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 154.0967ms 200 application/javascript
15:47:28 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/api/internal/javascript/framework
15:47:28 [Warn] Microsoft.AspNetCore.Session.SessionMiddleware Error unprotecting the session cookie.
15:47:28 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = "Framework", controller = "JavaScript"}. Executing action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Framework (UniversalDashboard)
15:47:28 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Framework (UniversalDashboard) - Validation state: Valid
15:47:28 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/vendor.f2d62da654956d044bb1.bundle.map
15:47:28 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Framework (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.PhysicalFileResult in 0.6729ms.
15:47:28 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor Executing Microsoft.AspNetCore.Mvc.PhysicalFileResult, sending file 'C:\inetpub\UDRestAPI\Modules\UniversalDashboard.Materialize\index.fa477c969b40baa568bc.bundle.js' with download name '' ...
15:47:28 [Info] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware Sending file. Request path: '/vendor.f2d62da654956d044bb1.bundle.map'. Physical path: 'C:\inetpub\UDRestAPI\client\vendor.f2d62da654956d044bb1.bundle.map'
15:47:28 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 258.4187ms 200 text/plain
15:47:28 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Framework (UniversalDashboard) in 343.7221ms
15:47:28 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 435.8787ms 200 text/javascript
15:47:28 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/api/internal/dashboard/theme
15:47:28 [Warn] Microsoft.AspNetCore.Session.SessionMiddleware Error unprotecting the session cookie.
15:47:28 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = "Theme", controller = "Dashboard"}. Executing action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard)
15:47:29 [Debug] PowerShellExecutionService ExecutionService constructor
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) - Validation state: Valid
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 0.3539ms.
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/css
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) in 71.329ms
15:47:29 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 175.8526ms 200 text/css
15:47:29 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/api/internal/javascript/index.fa477c969b40baa568bc.bundle.map
15:47:29 [Warn] Microsoft.AspNetCore.Session.SessionMiddleware Error unprotecting the session cookie.
15:47:29 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/api/internal/javascript/plugin
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = "Index", controller = "JavaScript"}. Executing action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Index (UniversalDashboard)
15:47:29 [Warn] Microsoft.AspNetCore.Session.SessionMiddleware Error unprotecting the session cookie.
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Index (UniversalDashboard) with arguments (index.fa477c969b40baa568bc.bundle.map) - Validation state: Valid
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = "Plugin", controller = "JavaScript"}. Executing action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard)
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Index (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.PhysicalFileResult in 0.527ms.
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) - Validation state: Valid
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor Executing Microsoft.AspNetCore.Mvc.PhysicalFileResult, sending file 'C:\inetpub\UDRestAPI\Modules\UniversalDashboard.Materialize\index.fa477c969b40baa568bc.bundle.map' with download name '' ...
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 10.811ms.
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/javascript
15:47:29 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) in 194.1056ms
15:47:29 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 439.3459ms 200 text/javascript
15:47:29 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/favicon.ico
15:47:29 [Info] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware Sending file. Request path: '/favicon.ico'. Physical path: 'C:\inetpub\UDRestAPI\client\favicon.ico'
15:47:29 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/api/internal/javascript/index.7820161eb77d1a26c1bc.bundle.map
15:47:29 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://udlab.domain.com:10001/api/internal/dashboard
15:47:30 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 87.8357ms 200 image/x-icon
15:47:30 [Warn] Microsoft.AspNetCore.Session.SessionMiddleware Error unprotecting the session cookie.
15:47:30 [Warn] Microsoft.AspNetCore.Session.SessionMiddleware Error unprotecting the session cookie.
15:47:30 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = "Index", controller = "Dashboard"}. Executing action UniversalDashboard.Controllers.DashboardController.Index (UniversalDashboard)
15:47:30 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = "Index", controller = "JavaScript"}. Executing action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Index (UniversalDashboard)
15:47:30 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.DashboardController.Index (UniversalDashboard) in 0.2901ms
15:47:30 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Index (UniversalDashboard) with arguments (index.7820161eb77d1a26c1bc.bundle.map) - Validation state: Valid
15:47:30 [Error] Microsoft.AspNetCore.Server.Kestrel Connection id "0HLT09KH7OT98", Request id "0HLT09KH7OT98:00000001": An unhandled exception was thrown by the application.
15:47:30 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 356.9853ms 500
15:47:30 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Index (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.PhysicalFileResult in 0.5382ms.
15:47:30 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor Executing Microsoft.AspNetCore.Mvc.PhysicalFileResult, sending file 'C:\inetpub\UDRestAPI\Modules\UniversalDashboard.Enterprise\index.7820161eb77d1a26c1bc.bundle.map' with download name '' ...
15:47:30 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Index (UniversalDashboard) in 1528.8002ms
15:47:30 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 1714.4709ms 200 text/javascript
15:47:30 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Index (UniversalDashboard) in 666.1976ms
15:47:30 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 1010.1484ms 200 text/javascript
Wanted to put an update on this that I made progress. The issue I was having were tied to the fact that I had the page setup for Windows Auth, but still had anonymous auth setup on the IIS page itself. I discovered this when i turned all of the auth and login page code off just to see if I could access it on IIS without any login.
Unfortunately, I am still having an issue on the page when i attempt to set it up to use Windows Auth properly. All that occurs is the login prompt continues to pop back up with Authorization Failed showing in the UD log. Based off the sample script on the UA Docs page, this was how I had my login page code setup:
Connect-UAServer -ComputerName http://localhost:10000
$dashboard = New-UADashboard
$auth = @()
$auth += New-UDAuthenticationMethod -Windows
$AuthPolicies = @()
$AuthPolicies += New-UDAuthorizationPolicy -Name "Admin" -Endpoint {
param($ClaimsPrincipal)
$id = ($Cache:AuthPolicyData | Where-Object {$_.groupname -eq 'admin'}).groupid
$ClaimsPrincipal.HasClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", $id)if($ClaimsPrincipal.HasClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", $id)){
$user = $ClaimsPrincipal.identity.name
$identity = Get-UAIdentity -name $user
if($identity -eq $null){
$role = Get-UARole -Name "Operator"
New-UAIdentity -Name $username -Role $role
}
$Session:AppToken = Grant-UAAppToken -Identity $Identity
}
$true
}
$LoginPage = New-UDLoginPage -AuthenticationMethod $auth -PassThru -AuthorizationPolicy $AuthPolicies
$dashboard.LoginPage = $LoginPage
Enable-UDLogging -FilePath .\udlog.log
Start-UDDashboard -Wait -Dashboard $dashboard -HttpsPort 10001 -AdminMode -AllowHttpForLogin
adam
January 26, 2020, 5:08am
9
Hmmm I know Iâve run into this before and itâs likely an IIS configuration setting and not necessarily a UD issue. I just canât for the life of me think what the problem was. Do you have forward auth token set in the web.config?
1 Like
Progress! I guess when i pulled in the 2.8.2 files i overwrote my web.config and erased the forced auth.
Login is now working, I load the dashboard without issue. I even see my domain/user name added under Identities.
However, iâm noticing that I cannot copy my apptoken ID to clipboard: âCannot bind argument to parameter âDataâ because it is nullâ. Attempting the commands manually in Admin Terminal do not seem to be returning any data.
and the user is not added to respective Role nor will it let me add it to the role: âCannot index into a null arrayâ
Obie
January 29, 2020, 6:20pm
11
Hey @dcherry88 , I am interested in this as well but running into some issues. I am going to attempt it again today when I get some free time. Let me know if you get it working, I am sure others will want to do this as well.
Thanks
-Obie
adam
January 29, 2020, 6:38pm
12
These are probably bugsâŚ
Iâm seeing issues with roles. Looking into that now.
I think we still have an issue with the clipboard in UD as well. We reopened that issue.
I am having the same problem here after upgrading to 2.8.3
i have 2 dashboards with enterprise license both on iis and both worked nice before the upgrade
now one of them is working and the other one is not.
the working one start code:
$Dashboard1= New-UDDashboard -Title âDashboard1â -NavbarLinks $NavBarLinks -Pages $pages -Navigation $Navigation -EndpointInitialization $EndpointInit -Theme $theme
Start-UDDashboard -wait -Dashboard $Dashboard1
the nonworking one start code is:
$Dashboard2= New-UDDashboard -EndpointInitialization $EndpointInit -Title âDashboard2â -NavbarLinks $NavBarLinks -Pages $pages -Theme $Theme
Start-UDDashboard -Wait -Dashboard $Dashboard2-PublishedFolder $Folder
i just installed the enterprise license moving out from community edition but i donât think itâs license related i think it relates more to the issue above.
I have narrowed the search path as i tested all the parts of the code
and i kept only this
#region DynamicPages
$pages += New-UDPage -DefaultHomePage -Name 'Login' -Content { New-UDHeading -Text "Hello, World!" -Size 1}
#region DynamicPages
$Dashboard2 = New-UDDashboard -Title "Dashboard2" -Pages $pages
Start-UDDashboard -Wait -Dashboard $Dashboard2
i think there is a bug related to dynamic pages on this version
adam
February 3, 2020, 8:30pm
15
Nothing changed around dynamic pages in 2.8.3. It was mostly theme changes so Iâm surprised this is happening. When you say it isnât working, whatâs your issue?
it gives a blank page only on IIS but when i do a normal start using
Start-UDDashboard -Dashboard $Dashboard2 -Port 1999
it works perfectly.
you are right itâs not dynamic pages or any thing else i Found the issue ,
$pages += New-UDPage -DefaultHomePage -Name âLoginâ -Content { New-UDHeading -Text âHello, World!â -Size 1}
-Name âLoginâ is not allowed when i change it to home it worked with me.
1 Like
Obie
February 6, 2020, 4:39pm
19
Hey All,
I must be missing something because I am having trouble getting the UA Dashboard to start up.
So i have 2 Sites in IIS, one bound to port 8080 and one bound to port 80
Site names are ITA(8080) and ITAutomation(80)
ITA is pointed to the web directory with a
web.config (same as example on Docs)
universal-automation.ps1
Import-Module UniversalAutomation
New-Item "C:\02-PowerShell\ita" -ItemType Directory -ErrorAction SilentlyContinue
Start-UAServer -InProcess -ConnectionString "C:\02-PowerShell\ita\database.db" -RepositoryPath 'C:\02-PowerShell\ita'
ITAutomation same thing
web.config (same as example on docs but updated to reference dashboard.ps1)
dashboard.ps1
Import-Module UniversalAutomation.Dashboard
Connect-UAServer -ComputerName http://ita.domain:8080
$Dashboard = New-UADashboard -ComputerName http://ita.domain:8080
Start-UDDashboard -Dashboard $Dashboard -Wait
When I load up the itautomation page (dns is ita ita.domain/) it loads the default UDDashboard page with all the tutorials/examples.
Been struggling with this for a few days now Any help will be appreciated.
adam
February 6, 2020, 5:22pm
20
This can happen if the $Dashboard is null so maybe New-UADashboard isnât working correctly. Can you enable stdout logs in the web.config to see if there is anything interesting in there? I would also use Enable-UDLogging to see if there are exceptions being shown.