0

How can I restrict the number of logged-in users through the connection string at the same time to a specific number? like licencing application for 10 users only? I tried Max Pool Size but they said that has a bad effect on app. performance, also I can't change it at the run time.

In another way, Let say we have an application running in our network, we need to restrict logged in user at the same time to only 5, So if the 6th one comes to log in the system not allow him

I appreciated your help.

BinShehab
  • 17
  • 4
  • There are some other posts trying to cover similar topic like [this](https://stackoverflow.com/q/599837/3110834), however It's too broad for a question in stackoverflow IMO. – Reza Aghaei Nov 26 '19 at 05:32
  • Let say we have an application running in our network, we need to restrict logged in user at the same time to only 5, So if the 6th one comes to log in the system not allow him, can you summarize the solution if it's already mentioned in the above link that you attached, Thanks. – BinShehab Nov 26 '19 at 07:35
  • BinShehab, as it's already mentioned in the first comment IMO it's too broad for a question is SO. These kind of problem usually can be handled by licensing mechanism. You may have different types of licenses for different customers and a license validation service. You also may need to have a session management mechanism so you can keep track of concurrent sessions and license of those sessions. Then you can decide for every request to allow to process or reject based on their lisence token which should be sent by the request. All these things should be carefully designed. – Reza Aghaei Nov 26 '19 at 08:19
  • I'm not saying this is the only solution, the solution depends to the requirements and a lot of details are needed for both reqirements and the solution. – Reza Aghaei Nov 26 '19 at 08:23
  • I'm still waiting for the answer..!! – BinShehab Nov 28 '19 at 03:43

0 Answers0