Adding idle detection to custom Web Application links
PME automatically times out inactive client sessions. If custom content links are added to the Web Applications framework, then the custom content must implement the idle detection, or activity on that content is not registered and the Web client session can time out unexpectedly.
Prerequisite: The custom application must be in the same Application Pool as the regular PME applications, and must use the same authentication configuration.
To add idle detection to custom content:
- In the custom Web application, Add references to jquery and jquery.idle.js.
- Create an IdleDetection object when the document has loaded.
NOTE: If you want your application to take part in keeping PME non-idle, but you do not want your application to log itself out after the idle period, you can add the following JSON as a parameter to the idle() method:
{enableLogoutRedirection: false;}
Example web.config for an application in the PME Application Pool:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.6" />
<httpRuntime targetFramework="4.6" requestValidationMode="2.0" enableVersionHeader="false" />
<authentication mode="Forms">
<forms name=".APPLICATIONFRAMEWORK" loginUrl="/SystemDataService/Auth" defaultUrl="/SystemDataService/Auth/GenerateAuthUrl" timeout="2880" protection="All" enableCrossAppRedirects="true" />
</authentication>
<machineKey decryption="AES" decryptionKey="AutoGenerate" validation="HMACSHA256" validationKey="AutoGenerate" />
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
Example minimal page that has idle detection added to it: