Start-UDDashboard : Error -4092 EACCES permission denied on IIS 8.5 (2012 R2)

#1

Universal Dashboard Community Edition - 2.3.2

I have a small dashboard I’m trying to start on an IIS server - it fails with the error:
Start-UDDashboard : Error -4092 EACCES permission denied

unless I change the Port to something other than 80.

How can I run my dashboards on an IIS server that is already serving pages from 80?

if ((Get-Module -Name "UniversalDashboard")){
    #already imported
} else { Import-Module -Name UniversalDashboard.Community }

# Refresh the dashboard
Get-UDDashboard | Stop-UDDashboard

$SessionKeyFile = $PSScriptRoot+'\fbsessionkey.txt'



$PageHome = New-UDPage -Name "Home" -Content {
    New-UDRow {
        
        New-UDColumn -Size 6 {
            New-UDElement -Id 'SessionKey' -Tag div -Endpoint{
                New-UDCard -Content { 
                    $SessionKey = Get-Content -Path $SessionKeyFile
                    New-UDHtml -Markup '<h4>Current Session Key: </h4>'
                    $SessionKey }
            }
            New-UDInput -Title "Enter New Session Key" -Endpoint { 
                param(
                    [Parameter(HelpMessage = "Paste a New Session Key here.....")]
                    [string]$NewSessionKey
                    )
                $Cache:NewSessionKey = $NewSessionKey
                $NewSessionKey | Out-File ($SessionKeyFile)
                $SessionKey = Get-Content -Path $SessionKeyFile
                New-UDInputAction -Toast "Saving Session Key: $NewSessionKey"
                Sync-UDElement -Id 'SessionKey'    
            }
            
        }
    } # End UDRow
} # End PageHome
  
    

$PageArray = @($PageHome)

$MyDashboard = New-UDDashboard -Title "Facebook Streaming Session Key" -Pages ($PageArray | Where-Object( {$_})) 

Start-UDDashboard -Wait -Dashboard $MyDashboard
#2

Using UD 2.3.2 (out today) or above, you can configure the dashboard as an IIS application.

The docs are here https://docs.universaldashboard.io/running-dashboards/iis#creating-nested-iis-sites

But as of today they don’t quite match what I’m seeing in the wild. To get it to work for me, when I modified the Index.html file in the Client folder, href needs to be changed from “/” to the relative path from the site root to the subfolder of your app. E.g. - “/MyDBTest/” or “/Apps/DB1/”
Unlike the docs, I needed to add a trailing slash.

In addition, in the same Index.html file, I had to add that relative folder path to the beginning of the paths for the javascript files, “/MyDBTest/main.[guid].bundle.js” and “/MyDBTest/vendor.[guid].bundle.js”.

Thanks,
Tim Curwick

#3

So the site is http://fbsession
I made a subfolder named “key”

I copied the universaldashboard.community folder contents into my key folder.
I edited the \inetpub\fbsession\key\client\index.html as you suggested above.

<script type="text/javascript" src="/fbsession/key/main.146ed6c767dc7ce4a75a.bundle.js"></script><script type="text/javascript" src="/fbsession/key/vendor.146ed6c767dc7ce4a75a.bundle.js"></script></body>

My dashboard.ps1 file from the original post is saved under \inetpub\fbsession\key\dashboard.ps1

Attempting to load http://fbsession/key results in a blank page. I do get the UDDashboard favicon.

Is your nested folder (key) an application under IIS management?
Unless I make it an application, I can’t load anything.

#4

Yes, it needs to be an application. (I assume. Mine is, and I can’t imagine it working otherwise.)
Delete “/fbsession” from the paths in Index.html. What you are putting in there is the relative path from the root of fbsession to the application or file.

Thanks,
Tim Curwick

#5

Ahhh. chopping the fbsession off. Getting closer.
Now the page is trying to load. I’m getting my Title, but nothing else.
Browser debugger is showing:
http://fbsession/key/api/internal/fonts/roboto/Roboto-Light.woff2 net::ERR_ABORTED 404 (Not Found)

I can’t find those fonts anywhere…

#6

Kirk,

Yeah, the font errors always show up. Not sure what’s up with that.

By “getting my Title”, do you mean a UDTitle that’s defined on the page, or the NavBar at the top of the page?
If the former, there’s something wrong with your page.
If the latter, that means UD is working well enough to serve up pages if it can figure out which page to serve and how to serve it, but in this case it couldn’t. (Or there’s something wrong with your page.)
Open Developer Tools in Chrome, go to the Network tab, then reload your UD page. It will tell you what it’s trying to load and what’s successful or not, which should point you to the right direction.

Couple more possible gotcha’s. I worked around these when they were problems, and as my workarounds are still place, I don’t know if they are still problems.

When looking for a page to serve, UD grabs the first partial match, rather than the fullest match. The work around is to sort the pages like so before feeding them to New-UDDashboard. We’re looking at both Name and URL, because static pages have the one, and dynamic pages have the other. We trim leading slashes because only dynamic pages have those.

$Pages = $Pages |
    Sort-Object -Descending -Property { ( [string]$_.Name + $_.URL ).TrimStart( '/' ) }

Defining a default home page was not working for me in this context. So for a home page, instead of defining a static page with the -Name “Home” with -DefaultHomePage set, I defined a dynamic page with the -URL ‘/’, and changed the -Content to an -Endpoint. (This dropped the home page from the default navigation list, but I’m willing to live with that. I put a link to the home page in a “footer” on each page. (To faciliate that, I put the home page link–the relative path to your dashboard, ‘/key’ in your case-- in a $Cache variable in the Dashboard script, for use by each page, as needed.))

Thanks,
Tim Curwick

#7

I am feeling pretty dumb right now.
Browsing to http://fbsession/key :
My page was loading with the Title bar and footer, just no content.

Clicking on the title bar took me to:
http://fbsession/key/home
and the page works fine.

I just needed to land on the /home page.

#8


I am going crazy. I get error permission denied. it works when I use port 8080.
what could be wrong?

  1. Use UD 2.3.2
  2. I placed the licence file in C:\inetpub\wwwroot\net472
#9

I downloaded the community edition to a different server and I tried. still the same
i followed this https://docs.universaldashboard.io/running-dashboards/iis#creating-nested-iis-sites
Please help me. I not using nested site

image

#10

-wait is not a valid option unless you are using IIS. Try taking that off.

#11

I am using IIS. I try to go to http://localhost/home and get error HTTP Error 500.19 - Internal Server Error
I try to follow the documentation

Configuring a site for Universal Dashboard

For this example we will look at the Default Web Site. In IIS Manager, right click on your Web Site and click Explore.

Copy the entire contents of the UniversalDashboard module to the wwwroot of the Default Web Site.

Create a dashboard.ps1 file and place it in the wwwroot folder. The dashboard should contain a dashboard definition and a call to Start-UDDashboard with the -Wait parameter specified.

Start-UDDashboard -Wait -Dashboard (

New-UDDashboard -Title “Hello, IIS” -Content {

New-UDCard -Title “Hello, IIS”

}

)

#12

Here is where I copied

#13

Please help me. I am struck, not able to deploy to IIS

#14

You shouldn’t be running your script in VS Code once it’s deployed to IIS. IIS will be starting the dashboard. The reason you are getting permission denied in VS Code is because something else is listening on the port that you have assign.

If you open a browser and go to the address: http://localhost:80, what happens? If you’ve configured IIS as stated in the article, it should show the dashboard.

1 Like
#15

I am getting this. is this something to do with application pool. I am spinning a new VM Server 2016 and test there, and I will let you know

#16

In the web.config file, try to comment out the line that states:

<requestFiltering removeServerHeader ="true" />

Like this:

#17

This is what I did the issue went away

  • Uninstall the Universal DashBoard
  • Delete Module from C:\Windows\system32\WindowsPowerShell\v1.0\Modules\UniversalDashBoard
  • Delete all files related UD in wwwroot directory
  • Reboot the computer
  • Install UD and it installs on C:\Program Files\WindowsPowerShell\Modules
  • copied files from C:\Program Files\WindowsPowerShell\Modules\UniversalDashboard\2.3.2 to wwwroot
    Now I am able to use iis to launch the website. I did not copy UniversalDashboard module to C:\Windows\System32\WindowsPowerShell\v1.0\Modules

image

#18

This is very very very important
Start-UDDashboard -Dashboard $Dashboard -Wait

YOU NEED TO PUT -wait. if you don’t put -wait as shown above, you will get bad gateway error on iis when you launch website