Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested dashboard under IIS have incorrect page URL #1078

Closed
mponton opened this issue Sep 3, 2019 · 3 comments
Closed

Nested dashboard under IIS have incorrect page URL #1078

mponton opened this issue Sep 3, 2019 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@mponton
Copy link

mponton commented Sep 3, 2019

Describe the Issue

Based on https://github.com/adamdriscoll/universal-dashboard-documentation/blob/master/running-dashboards/iis.md#creating-nested-iis-sites we only need to change base href if we want to host a dashboard under IIS as a nested site.

Given a website with only an index.html and an application with alias ui that host UD (with a modified base href set to /ui/), browsing to https://my.domain.tld/ui result in a Page Not Found error inside the React app. The header/footer/navbar are loaded correctly, but the pages aren't. You can manually browse to the page using https://my.domain.tld/ui/page_name but all links in the app seem to be broken.

To Reproduce

Steps to reproduce the behavior:

  1. Setup a website in IIS, in the site's root, simply put an index.html to confirm the site is working and keep things simple.
  2. Under that website in IIS add an application with a virtual path of /ui and a physical path that points to your UD folder.
  3. In the UD folder, ensure the <base href="/ui/"/> is present in the <head> of client/index.html
  4. In the UD folder, create a dashboard.ps1 file with this content:
$Pages = @(
    (New-UDPage -Name "Home" -Icon "home" -Content {
        New-UDRow -Columns {
            New-UDColumn -Size 12 -Endpoint  {
                New-UDHeading -Text "This is the home page"
            }
        }
    } -DefaultHomePage),
    (New-UDPage -Name "ui/Test" -Icon "book" -Content {
        New-UDRow -Columns {
            New-UDColumn -Size 12 -Endpoint  {
                New-UDHeading -Text "This is the second page"
            }
        }
    })
)

$Dashboard = New-UDDashboard -Title "Nested Dashboard" -Page $Pages

Start-UDDashboard -Dashboard $Dashboard -Wait
  1. Browse to your.domain.tld/ui

Expected behavior

Fully working dashboard with all links working correctly.

Actual behavior

Browsing to your.domain.tld/ui shows a Page not found error
chrome_2019-09-03_10-12-20

Browsing to your.domain.tld/ui/Home correctly shows the Home page
chrome_2019-09-03_10-12-29

Clicking on the NavBar's Home link brings you to your.domain.tld/Home
Broken of course, since invalid path

Browsing to your.domain.tld/ui/Test shows a Page not found error
chrome_2019-09-03_10-12-39

Browsing to your.domain.tld/ui/ui/Test correctly shows the Test page
chrome_2019-09-03_10-12-48

Clicking on the NavBar's Test link brings you to your.domain.tld/ui/Test
Showing Page not found as above

Version Information

  • Operating System: Windows 2016 Server
  • PowerShell Version: 5.1.14393.2636
  • Universal Dashboard Version: 2.5.3 (Licensed version)
  • UD Hosting Method: IIS

Additional context

  • Related to [Docs] Document nested IIS sites #555
  • I was unable to get UD working in a nested setup without using an application under IIS. This always resulted in IIS failing to start UD with error ...failed to start process with commandline ' ', ErrorCode = '0x80070057 : 0. in the event log. I suspect a step is missing in the documentation for this to work. In any case, because of other considerations, I would definitely need this to work as a separate application running under another AppPool user with some different settings.
@adamdriscoll
Copy link
Member

I can reproduce this. Looking into it.

@mponton
Copy link
Author

mponton commented Sep 30, 2019

Thanks for the fix! Is this available in the enterprise nightly build? And if so, is the nightly build solid enough for development until the next official release?

@adamdriscoll
Copy link
Member

Tonight's nightly will be much more stable. I had to make some changes to the way that session and connections were being tracked so there were likely issues but my latest PR should fix those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants