Idle Timeout Issues

I am trying to change the idle timeout from the default 25 minutes. I have tried two different ways. One has been to add IdleTimeout to the new-uddashboard. When I do this, I have found that the cookie is still for only 25 minutes and my grids no longer load. I get errors such as this when this happens:
[Warn] ComponentController Endpoint fb122b75-9c51-4e69-935f-2a98e894112c not found.

This is consistent with every single grid that I have.

So, I thought I would try it differently and use the Grant-UDJsonWebToken. I set the date with this:

$date = [DateTime]::UtcNow.AddMinutes(40)

and then the token with this:

$token = Grant-UDJsonWebToken -Identity $Credentials.UserName -Expiry $date -Role $Role

and finally do UDAuthResult:

New-UDAuthenticationResult -Success -UserName $Credentials.UserName -Token $token

Trying this method, my cookie is still only valid for 25 minutes.

Am I doing something wrong with this?

Hi @dkkazak,

As far as i know, there is currently no way to increase the timeout .

@adam correct me if i’m wrong?

Whats the use case? If we’re talking info screens you could use UD-Helmet to set Meta refresh on the page?
https://www.w3schools.com/TAGS/att_meta_http_equiv.asp

Should refresh the site clientside and renegotiate the timeout.

1 Like

Here’s what I’ve done, and it seems to work. I’m running my dashboard in IIS with Windows Authentication.

First, I set my IdleTimeout to 43200 on the Application Pool in IIS, and disable recycling.

In my dashboard.ps1:
$ITO = New-TimeSpan -Minutes 1440

Start-UDDashboard -Content {
$Auth = New-UDAuthenticationMethod -Windows
$LoginPage = New-UDLoginPage -AuthenticationMethod @($Auth) -PassThru
New-UDDashboard -Title “” -LoginPage $LoginPage -Footer $Footer -IdleTimeout $ITO -EndpointInitialization $EI -Pages @($Pages) -Navigation $Navigation
} -Wait -AllowHttpForLogin -EndPoint $LogFileEndpoint

I can leave a dashboard up all night, and come back and everything is still working. I have a dashboard that connects to Office 365 for various functions, i have a page that monitors my DFS replication, I have a page that lets people start and stop scheduled tasks. Technically still in Beta, but seems to be working nicely.

1 Like

+1 dude!
I’ll copy some of this for myself!

Cool. I"ll have to do some playing with this to see how this works. Gives me a place to start, at least. Thanks!

I have been fighting with timeouts for a while now and i have the same setup here: iis and AD authentication but keep getting login prompt when a session is idle for over an hour… I have tried the setting above with no luck, also adding page refresh but although that doesn’t result in authentication prompts it fails to load elements…

Make sure that you have the IIS setting for ASP.NET Core set in the web.config as well.

I tried setting the meta http-equiv refresh using helmet, but it does not accept the attribute.
image

I can set other meta attributes but not the http-equiv one. Any suggestions?

Hi @jmiranto,

Could you try wrapping it in?

    "http-equiv"="refresh"'

Should work?

This is superb and initial testing it works! Im going to leave it overnight for the proper test but looks like a great solution.

Import-Module UniversalDashboard.Helmet

New-UdHelmet -Content {
    New-UDHTMLTag -Tag "meta" -Attributes @{
        'http-equiv' = 'refresh'
        'content' = '600'
    }
}
2 Likes