You selected Web when you created this thread, but I see elsewhere that this is a WInForms app. You can try a trick I used with VFP. First rule. Don't set a logged in flag or store the workstation ID. You need something that cleans up after itself. Here's how it works:
When the user logs in, create a text file on the server. The user needs exclusive access to it. Store the filename in the DB. I put it in the user table, so it's associated with their login. Keep the file open exclusive while the user is logged in. If they log out, delete the file. If they crash or reboot, check the user table on login. If you can't open the text file, the user is still logged in.
>Hi Craig. Thanks for replying
>Don't know if this will help as users are not tied to workstation Id's
>Also, if somebody Ctrl,aLt,Delete, Ii Have stored a Worksation Id for the user, I will still think they are logged in if they have not exited gracefully from the system??
>
>Regards,
>Gerard
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer