Is there a way to limit sessions per user?

Author: (hoogmike)

Hi, we have a Uniface 8 application consisting of an Oracle 9 database and uniface forms hosted on a Sun Solaris 9 server, and Uniface 8 clients installed on Win XP desktops.

I am wondering if there is a way we can limit the number of client sessions a user can have open on their desktop at the same time? e.g. limit users to two concurrent sessions. We have found that some users have up to 8 sessions open concurrently, causing the application to slow.



  1. Hello Mike,

    Two things you can try :

    1. use the single_instance setting in your usys.ini file

    IDF=Uniface Seven

    When a new instance of a Uniface application is started, Uniface first checks whether that application is listed under the [SINGLE_INSTANCE] section. If so, it looks for a window that starts or ends with the specified title. The title string is not case sensitive. If such a window is found, the focus changes to the existing application, and a second instance is not started.  (see Uniface Library)

    2. use the $timeout setting in your .asn file

    for example : $timeout = 40

    In this case, if an application is 'idle' during 40 minutes, you can exit the application (via coding in Asynchronous Interrupt trigger).



    Author: BenHen (
  2. This is something I saw quite often:

    Make a table in your menu/autorisation system.
    When a user starts a uniface application (logon fom or something) log that in the table.
    When the record already exists, increase the counter by one.
    When the counter gets over a maximum that you have set, deny the user access.
    When the user exits the application, decrease the counter.

    if the application crashes the counter is not decreased, so give your helldesk a form to reset the counter.
    if your system shuts down at night (for backup, batches) reset all counters.

    This is a really old solution, but it works.

    NB: this is for client/server, not for Web.

    Theo Neeskens
    Solution Architect
    Uniface Services


    Author: Theo Neeskens (
  3. Hi Benoit,

    I got the usys setting [SINGLE_INSTANCE] working for IDF, just as in your example.
    It does not seem to work for uniface.exe, when I do something like UNIFACE=My Uniface Application.
    My current Uniface version is 9.3
    Any tips or tricks?


    Author: Arjen van Vliet (
  4. Problem solved...
    For Uniface runtime the setting needs to be:
    name of the Uniface application startup shell=window title

    Author: Arjen van Vliet (
  5. Hi,

    if all your customers have different userids during database logon,

    I think you could do something from the oracle database management,
    Because it is managed by the database, no maintenance is necessary for aborted processes.

    The rest is the same as the solution with the database table.

    A very easy option is a small c++ routine (packed in a dll)
    which scans all application windows on windows and count the unifaces/idfs running.

    If you are interested in that soultion, send me a mail.

    Success, Uli

    Author: ulrich-merkel (
  6. Jan 1, 2010

    "wishes" fulfilled: Is there a way to limit sessions per user?

    by ulrich-merkel
        Change the moderation status by clicking the following links.Approved1 star of excellence2 stars of excellence3 stars of excellence

    start the new year with another support from the dITo initiative

    Is there a way to limit sessions per user?

    A very easy-to-use solution can be found on the

    giveaways page from

    All clients of a given DLL are counted; use different DLLs for different groups of applications.

    Success, Uli

    Author: ulrich-merkel (