To access and work with data on the server, I user LogonUser and
ImpersonateLoggedOnUser to access and also RUNAS to execute commands that
need to be done in DOS.
These of course open logon sessions on the server. The problem is that
after finishing the RUNAS or after closing the LogonUser by using
RevertToSelf, the authentication is removed, but the logon session(s) remain
open on the server for a minute or two. If the logon sessions are added
quicker than they disappear, we quickly run out of Windows licenses on the
server.
Does VB.NET or the .NET Framework provide a way of removing such logon
sessions, and hopefully with the ability to specify which workstation the
logon session came from? We have programs that run on multiple
workstations. It would be good if a program running on one workstation
could programmatically remove its own logon session(s) on the server without
affecting logon sessions from other workstations. Thanks.
|