In certain situations you may not want to allow end users to click on an application multiple times. This is possible to configure in AppPortal but is not currently available in Web Access.

We’ve therefore come up with a way to achieve this with Web Access using some Javascript.

Disclaimer: If you are not comfortable with altering web code, please do not read any further. We also have to point out that this would be unsupported and carried out at your own risk!

 

The following shows how to change this for Web Access

 Version 7.6 of vWorkspace

1. On your vWorkspace Web Access server, browse to:

C:\inetpub\wwwroot\web\Scripts\

Where 'web' is your vWorkspace Web Access site name.

2. Make a copy of Apps.js in case you make any mistakes, then open Apps.js in your preferred text editor.

Around line number 169 you should see the following:

$("div[id^='cell_']").click(function () {
        SetSessionTimeout();
        var args = new String($(this).attr("cmdargs"));
        $("#cmdArgs").val(args);
        $("form").attr("url", root + "SiteMaster/ShowDialog").submit();
    });              //end appclick event
}

 3. Underneath,

$("form").attr("url", root + "SiteMaster/ShowDialog").submit();

Add the following line:

ShowMessageDialog("Please wait for your application to load. If nothing happens please contact your IT helpdesk, do not click multiple times.");

So that you have:

$("div[id^='cell_']").click(function () {
        SetSessionTimeout();
        var args = new String($(this).attr("cmdargs"));
        $("#cmdArgs").val(args);
        $("form").attr("url", root + "SiteMaster/ShowDialog").submit();
ShowMessageDialog("Please wait for your application to load. If nothing happens please contact your IT helpdesk, do not click multiple times.");
    });              //end appclick event
}

4. Save the file.

5. Do a quick reset of IIS just to ensure the change is active.

 

 

Version 8 MR1 of vWorkspace

 

1. On your vWorkspace Web Access server, browse to:

C:\inetpub\wwwroot\web\Scripts\

Where 'web' is your vWorkspace Web Access site name.

2. Make a copy of Apps.js in case you make any mistakes, then open Apps.js in your preferred text editor.

Around line 191, underneath

$("form").attr("url", root + "Apps/LaunchApps").submit();

3. Add the following line:

ShowMessageDialog("Please wait for your application to load. If nothing happens please contact your IT helpdesk, do not click multiple times.");

So that you have:

function AppClick(app) {
    SetSessionTimeout();
    var args = new String($(app).attr("cmdargs"));
    $("#cmdArgs").val(args);
    $("form").attr("url", root + "Apps/LaunchApps").submit(); 
ShowMessageDialog("Please wait for your application to load. If nothing happens please contact your IT helpdesk, do not click multiple times.");
 

4. Save the file.

5. Do a quick reset of IIS just to ensure the change is active.



Result

For both version 7.6 and version 8 MR1 of web access, this will allow the application to load normally but will also pop up a dialog box after an application is clicked which will prevent any further applications being launched until the user clicks the OK button. You can also customise the text shown on screen to help educate the end users to not click on multiple applications one after the other.

 

 

If you combine this line of code with a web session timeout (WebAccess Site Properties| Browser Interface| Other Settings) of for example 1-2 minutes, then users won't be able to flood your vWorkspace farm with multiple requests in an extremely short period of time as they will get logged out and have to re-log in.

 

N.B Please remember the above is provided as something to trial in your own environment if you are seeing users generating multiple requests, it won't suit everyone's work flow!

 

Please let us know below if this was helpful for you! :)