Session Timeout


I created a dashboard (version 2.4 / licensed) which is running on an IIS. There are UDAuthorizationPolicies as well. Everything works fine and I’m happy so far but there is one thing that bugs me and I hope there is a simple solution to it. When I haven’t used the dashboard for like 20-30 minutes and I start using it without refreshing the page (e.g. pressing F5, reopen the dashboard) error messages pop up in the lower right corner. pretty much every functionality is build on an SQL queries or on WMI actions. I get messages like:

‘you cannot call a method on a null-valued expression’


‘method invocation failed because [System.DBNull] …’

but the dashboard still works even though I’m getting these messages. When I press F5 and do the same action again, everything works fine without getting these error messages.

So, is there a way to keep the session alive or is it possible to query the timeout and popup a Toast message in order to get people refreshing their page? Any help is appreciated.


make sure that the app pool dont idle out, it do this default after 20 min, so IIS will terminate the app pool.
see the idle timeout section:

thanks, I’m testing it right now. Will keep you updated about the result in about 30 minutes :slight_smile:

unfortunately it didn’t work. I’ve set the application ‘Idle Time-out (minutes)’ to zero, recycled the application pool, restarted the page and I still get error messages.

one of my pages is kind of a monitoring page and there are several buttons which start sql queries and show the result temporarily in a modal window.

I get the error message:

‘Cannot send data if the connection is not in the ‘Connected’ State’

one refresh, everything works as intended.

@adam Hey Adam, do you have an advice for me?

Hi @H4nYolo,

It looks like the websocket is disconnecting for some reason. Can you look in the developer tools for your browser for any weird errors? If you press F12 it should open those up.

Hi @adam

seems like you pointed me in the right direction.

this is what I get after a while using the company standard IE:

when I do the same with Firefox ESR I have no problems at all means I need to figure out what they changed by policy to make IE fail after like 20 minutes.

IE11 dont support Websockets :slight_smile:

so dont use that.

Hey @McAndersDK do you have a source for this statement? When you google for IE 11 websocket support pretty every source is telling me its supported. :thinking:

@H4nYolo are you using the -AutoRefresh and -RefreshInterval parameters on your new-udpage to prevent it from timing out? Just my 2 pence worth…just was thinking if F5 sorts the problem its like your page has become stale and needs refreshing every now and then to keep the connection active. So if your not using the auto refresh parameters then I would give that a shot to see if that solves the problem.

I’ve also been looking for a way to indicate to users that their connection is no longer active. We have a number of staff that actively use a dashboard, and if, for example, they undock their laptop or an admin restarts IIS to apply a change, their connection stops.

To help with this I put a clock at the top of every page with a 1 second refresh and let the staff know that if the clock is not running, they’re disconnected and should refresh the page before trying to do anything. It’s certainly not a great solution though.

@psDevUK hey, yes, but nothing helps. it times out in IE but not in firefox.

@daver107 have you tried firefox? i have no problems with firefox ESR but its not company standard. a solution for IE would be awesome. I’m kinda glad I’m not the only one having this problem :stuck_out_tongue_winking_eye:

@adam I tried it on a vanilla windows server 2019 without custom policies and I get the same warnings and errors. there is a -IdleTimeout switch on the new-uddashboard command but it’s not documented so far. could this be a solution?