IIS Project - Page is not refreshing with New-UDElement

Hello,

I have been playing around with Universal Dashboard for a little bit now, but officially asked to create a licensed one just a few weeks ago.

The goal:

Create an IIS site that will run when I submit user input and then provide a dynamic URL when the script is finished generating their file.

For some reason, this works flawlessly locally and just keeps spinning on IIS when accessed from the web. (Permissions maybe?)

Kind Regards,
Matthew

Hey Matthew! Welcome to the forums! It sounds like it could be permissions but could you give a little code snippet of what your trying to do?

Running this on Windows Server 2016

    Import-Module -Name UniversalDashboard
    Get-UDDashboard | Stop-UDDashboard
    $Folder = Publish-UDFolder -Path "C:\SCH\share" -RequestPath "/share"          
    $Root = $PSScriptRoot
    $Init = New-UDEndpointInitialization -Variable "Root"
    Start-UDDashboard -Wait -PublishedFolder $Folder -Dashboard (
    New-UDDashboard -Title "Content Brief Script" -ErrorAction SilentlyContinue -Footer $Footer -Content {
        Enable-UDLogging -FilePath "C:\SCH\logging.txt"
        New-UDInput -Title "Enter Your Keyword" -ErrorAction SilentlyContinue -Endpoint {
            param($Text)
            ###Main Function Code###
            Close-ExcelPackage $excel
            Stop-SeDriver $Driver
            Remove-Item -Path $SFXlsx -Force
            Copy-Item -Path $MasterPath -Destination "C:\SCH\share\$($Keyword).xlsx"
            New-UDInputAction -Content @(
                New-UDCard -Title "Download Area" -Content {
                    New-UDElement -Id "DownloadLink" -Tag 'a' -Attributes @{
                        'href'     = "/share/$($Keyword).xlsx"
                        'download' = "contentbrief-$($Keyword).xlsx"
                        className  = "btn"
                    } -Content {
                        "Download"
                    }
                }
            )
        }
    } -EndpointInitialization $Init
)

It does look like a permission issue. Can you try this:

try {
Close-ExcelPackage $excel
            Stop-SeDriver $Driver
            Remove-Item -Path $SFXlsx -Force
            Copy-Item -Path $MasterPath -Destination "C:\SCH\share\$($Keyword).xlsx"
            New-UDInputAction -Content @(
                New-UDCard -Title "Download Area" -Content {
                    New-UDElement -Id "DownloadLink" -Tag 'a' -Attributes @{
                        'href'     = "/share/$($Keyword).xlsx"
                        'download' = "contentbrief-$($Keyword).xlsx"
                        className  = "btn"
                    } -Content {
                        "Download"
                    }
                }
            )
}
catch 
{
      Show-UDToast -Message ($_.ToString())
}

That didn’t display an error message, however, I moved stop-sedriver further down and it worked.