Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multi User
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01624690
Message ID:
01624780
Vues:
54
One approach might be to use SignalR - but you'd need a small standalone Winforms app to run as the server.
Route all logins through the server and maintain a collection there of all logged in clients.
When a user logs in look up their ID in the collection
If present then the app thinks they are logged in so message the client.
If there is no response then they are no longer logged in so accept the new attempt as the current client.
If there is a reponse then you know they are already logged in using another WinForms instance - do what you have to do.....

When a user logs out normally then remove them from the client collection.

Example of using SignalR with WinForms here : https://code.msdn.microsoft.com/windowsdesktop/Using-SignalR-in-WinForms-f1ec847b

>Hi Viv thanks for replying
>This is a Windows Forms app, running on Sql Server
>
>Regards,
>Gerard
>
>
>>>Hi.
>>>Just looking for ideas/best practise in processing multiple users
>>>Our app can have multiple users logging in (Maintained in a Sql Database)
>>>App using Sql Server, C# and can be run from Lan PC or Rdp session or Stand alone
>>>
>>>
>>>Ideally, don't want the same user logging in twice, but how do we determine if:
>>>A user is really in the system
>>> v/s
>>> A user might have logged in but there was a power cut and Application still thinks they are logged in but they have in fact been kicked out
>>>
>>>If there is a reliable way of telling that a User is in fact in the system, then at login point we can prevent access by the same user id
>>
>>You've got this under 'Web' application so I assume this is ASP.NET ?
>>Are you using Forms Authentication ?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform