[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

How Do I Determine The Workstations Sharing Application From The Server?

Hi Friends,
    Please, Can anybody help me to get a simple code or API's file and it sample of program, that will always, automatically be checking the network for the numbers of workstations that are sharing the same application from the main server.
   I want my application on the main server to be able to detect the numbers of computers on the network that are sharing the same application from the server. And how I can automatically close the shared applications from the computer that is not eligable to open the application at limit.
   Once again, I will be too; very very grateful to get somebody to help me out of this task.
   I grateful u all.

  • 2
1 Solution
I use a workaround for this in my apps, as there are many things that "could go wrong" or be different...

Since I know the workstations are sharing data on the server (at least that's what they generally do :)), the program has a path to a data-directory on the server. I have the program open a file (I call it a "lock-file") for exclusive write access on the server (i.e. with the workstation name or a number, etc.). This file stays open while the application is running. When the application closes, I close the file. If I want to test how many applications are running, I just count the files that are currently open.

This has worked quite well for me (for checking network licensing).

I also add some sort of failsafe, to make sure licenses aren't getting stuck: i.e. when starting, check if the data is being shared already (try to open the data exclusively): if it is not being shared, then we are the first / only user: we can safely delete all remaining "lock-files". The server can also do this every now and then. Usually this is not required though, but it is better to test than to have the users complain about locked licenses.

Also, if you use the "lock-files" on a workstation-basis (i.e. use the name of the workstation), the user can open the application several times on the same workstation without having the licenses decreased (if you want to allow this).

Which way did you choose? How'd it go? :)

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now