🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Timedout viewmodel
This page was created by Lars.olofsson on 2023-05-24. Last edited by Wikiadmin on 2026-07-29.

A Timedout ViewModel lets you replace Turnkey's built-in timeout screen with your own MVC page after an inactive streaming client reaches its configured timeout.

What happens when a client times out

A Turnkey Streaming application keeps server memory for each active client while that client is connected. When a configured timeout expires, Turnkey can move the user to an MVC page that does not require those streaming-client resources.

Turnkey uses the following timeout-page behavior:

Condition Result
No ViewModel named Timedout exists Turnkey uses its built-in, simple Timedout page.
A ViewModel named Timedout exists and is an MVC page Turnkey uses your ViewModel as the timeout page.
A ViewModel named Timedout exists but is not an MVC page It cannot serve as the custom timeout page.

The timeout itself is not enabled by creating this ViewModel. Configure a server-wide or per-page timeout as described in Documentation:Turnkey Client Timeout. By default, no timeout is active; the timeout setting is -1.

Create a custom timeout page

  1. In MDriven Designer, create a ViewModel named exactly Timedout.
  2. Configure the ViewModel as an MVC page. This is required: a streaming page cannot be used as the timeout page.
  3. Design the content that users should see after their session times out. For example, show a message such as Your session has timed out and provide the navigation appropriate for your application.
  4. Configure a timeout using Documentation:Turnkey Client Timeout. You can configure it for the whole server in TurnkeySettings.xml, or set the TurnkeyTimeoutMinutes tagged value on an individual ViewModel. The individual ViewModel setting takes precedence over the server-wide setting.
  5. Run the application, open a page to which the timeout applies, wait longer than the configured timeout, and verify that Turnkey displays the custom Timedout ViewModel.

Example

Assume the server-wide configuration contains:

<TurnkeyTimeoutMinutes>1</TurnkeyTimeoutMinutes>

When a user remains inactive long enough for that timeout to apply, Turnkey moves the user from the streaming application to the MVC ViewModel named Timedout. If that ViewModel does not exist, Turnkey shows its built-in timeout page instead.

If a particular application page has its own TurnkeyTimeoutMinutes tagged value, that page-specific value overrides the server-wide value.

MVC requirement

The custom Timedout ViewModel works only when it is an MVC page. MVC rendering is used because the timeout destination must not require the streaming-client resources that the timeout feature releases.

For information about rendering MVC ViewModels, see Documentation:Render MVC ViewModel without turnkey. For general ViewModel structure and design, see Documentation:ViewModel.

Troubleshooting

Symptom Check
The timeout page never appears Confirm that a timeout is configured. No timeout is active when the setting is -1.
The built-in page appears instead of the custom design Confirm that the ViewModel name is exactly Timedout and that it is configured as an MVC page.
One page times out at an unexpected interval Check whether that ViewModel has a TurnkeyTimeoutMinutes tagged value. A page-specific value overrides the server-wide setting.

See also